-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
875acc3
commit fea6ee7
Showing
9 changed files
with
318 additions
and
355 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
error[E0277]: the trait bound `C: Sealed` is not satisfied | ||
--> tests/fail/01-general.rs:20:12 | ||
--> tests/fail/01-general.rs:20:6 | ||
| | ||
20 | impl T for C {} | ||
| ^ the trait `Sealed` is not implemented for `C` | ||
| ^ the trait `Sealed` is not implemented for `C` | ||
| | ||
= help: the following other types implement trait `Sealed`: | ||
A | ||
B | ||
note: required by a bound in `T` | ||
--> tests/fail/01-general.rs:11:1 | ||
| | ||
11 | #[sealed] | ||
| ^^^^^^^^^ required by this bound in `T` | ||
12 | trait T {} | ||
| - required by a bound in this trait | ||
= note: `T` is a "sealed trait", because to implement it you also need to implement `__seal_t::Sealed`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it | ||
= help: the following types implement the trait: | ||
A | ||
B | ||
| - required by a bound in this | ||
= note: this error originates in the attribute macro `sealed` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
error[E0277]: the trait bound `C: Sealed` is not satisfied | ||
--> tests/fail/02-nesting.rs:26:42 | ||
--> tests/fail/02-nesting.rs:26:6 | ||
| | ||
26 | impl lets::attempt::some::nesting::T for C {} | ||
| ^ the trait `Sealed` is not implemented for `C` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Sealed` is not implemented for `C` | ||
| | ||
= help: the following other types implement trait `Sealed`: | ||
A | ||
B | ||
note: required by a bound in `T` | ||
--> tests/fail/02-nesting.rs:8:17 | ||
| | ||
8 | #[sealed(pub(crate))] | ||
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `T` | ||
9 | pub trait T {} | ||
| - required by a bound in this trait | ||
= note: `T` is a "sealed trait", because to implement it you also need to implement `lets::attempt::some::nesting::__seal_t::Sealed`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it | ||
= help: the following types implement the trait: | ||
A | ||
B | ||
| - required by a bound in this | ||
= note: this error originates in the attribute macro `sealed` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
error: Sealing a function from implementation but allowing it to be called is already done by sealing the trait itself. If you want to seal this function, but not others, consider adding `partial` to the `sealed` attr on the trait: `#[sealed(partial)]` | ||
--> tests/fail/08-partial-seal.rs:5:2 | ||
--> tests/fail/08-partial-seal.rs:3:1 | ||
| | ||
5 | #[seal(callable)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
3 | #[sealed] | ||
| ^^^^^^^^^ | ||
| | ||
= note: this error originates in the attribute macro `sealed` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
error: This function is sealed from implementation, but it does not have a default implementation. This effectively seals the entire trait, which would be clearer to do by not having the trait seal be partial. | ||
--> tests/fail/10-partial-without-default.rs:5:2 | ||
--> tests/fail/10-partial-without-default.rs:6:5 | ||
| | ||
5 | #[seal] | ||
| ^^^^^^^ | ||
6 | fn sealed(); | ||
| ^^^^^^ |