Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/book/src/advanced/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Advanced concepts.
- [Generics and Trait Constraints](./generics_and_trait_constraints.md)
- [Assembly](./assembly.md)
- [Never Type](./never_type.md)
- [Trivial Encoding](./trivial_encoding.md)
7 changes: 6 additions & 1 deletion sway-error/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,13 @@ impl TrivialCheckFailedData {
bottom_helps.push(never_trivial_help);
}

let major = env!("CARGO_PKG_VERSION_MAJOR");
let minor = env!("CARGO_PKG_VERSION_MINOR");
let patch = env!("CARGO_PKG_VERSION_PATCH");
bottom_helps.push(
"For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html".to_string()
format!(
"For more info see: https://fuellabs.github.io/sway/v{major}.{minor}.{patch}/book/advanced/trivial_encoding.html",
)
);

if matches!(self.can_be_made_trivial, Some(true)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ warning: Type is not trivially decodable
| --- help: Consider changing this type to `u64`.
|
= help: `u32` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand Down Expand Up @@ -66,7 +66,7 @@ error: Type is not trivially decodable
|
= help: Enums are represented as tagged unions and because of that they cannot be trivially decoded. But where needed, they can be wrapped by `TrivialEnum`, and their original value can be retrieved later with `unwrap`.
= help: `bool`, `u16`, `u32` are never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -89,7 +89,7 @@ error: Type is not trivially decodable
| ---------------- info: This is the reason `NonTrivialStruct` is being checked
|
= help: `bool` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -104,7 +104,7 @@ error: Type is not trivially decodable
| -------- help: Consider wrapping this type like `TrivialEnum<SomeEnum>`.
|
= help: Enums are represented as tagged unions and because of that they cannot be trivially decoded. But where needed, they can be wrapped by `TrivialEnum`, and their original value can be retrieved later with `unwrap`.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -119,7 +119,7 @@ error: Type is not trivially decodable
| -------- help: Consider wrapping this type like `TrivialEnum<SomeEnum>`.
|
= help: Enums are represented as tagged unions and because of that they cannot be trivially decoded. But where needed, they can be wrapped by `TrivialEnum`, and their original value can be retrieved later with `unwrap`.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -131,7 +131,7 @@ error: Type is not trivially decodable
| --- help: Consider changing this type to `u64`.
|
= help: `u32` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -143,7 +143,7 @@ error: Type is not trivially decodable
| --- help: Consider changing this type to `u64`.
|
= help: `u16` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -155,7 +155,7 @@ error: Type is not trivially decodable
| ---- help: Consider changing this type to `TrivialBool`.
|
= help: `bool` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -167,7 +167,7 @@ error: Type is not trivially decodable
| ---- help: Consider changing this type to `TrivialBool`.
|
= help: `bool` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

error: Type is not trivially decodable
Expand All @@ -179,7 +179,7 @@ error: Type is not trivially decodable
| ---- help: Consider changing this type to `TrivialBool`.
|
= help: `bool` is never trivially decodable.
= help: For more info see: https://fuellabs.github.io/sway/v0.70.3/book/advanced/trivial_encoding.html
= help: For more info see: https://fuellabs.github.io/sway/v0.71.1/book/advanced/trivial_encoding.html
____

Aborting due to 9 errors.
Expand Down
Loading