🚧 and ⚠️
Sometimes the code examples in the book don't work. If an example doesn't work, it will have a 🚧 or a ⚠️ in it. 🚧 is like "under construction": it means that the code is not complete. Rust needs a fn main()
(a main function) to run, but sometimes we just want to look at small pieces of code so it won't have a fn main()
. Those examples are correct, but need a fn main()
for you to run them. And some code examples show you a problem that we will fix. Those ones might have a fn main()
but generate an error, and so they will have a ⚠️.