-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop being so bail-y in candidate assembly #132090
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ struct Vtable(dyn Cap); | |
trait Cap<'a> {} | ||
|
||
union Transmute { | ||
t: u64, | ||
t: u128, | ||
u: &'static Vtable, | ||
} | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
tests/ui/const-generics/generic_const_exprs/bad-multiply.rs
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// regression test for #124350 | ||
|
||
struct Node<const D: usize> {} | ||
|
||
impl<const D: usize> Node<D> | ||
where | ||
SmallVec<{ D * 2 }>:, | ||
//~^ ERROR generic parameters may not be used in const operations | ||
//~| ERROR constant provided when a type was expected | ||
{ | ||
fn new() -> Self { | ||
Node::new() | ||
} | ||
} | ||
|
||
struct SmallVec<T1>(T1); | ||
|
||
fn main() {} |
18 changes: 18 additions & 0 deletions
18
tests/ui/const-generics/generic_const_exprs/bad-multiply.stderr
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: generic parameters may not be used in const operations | ||
--> $DIR/bad-multiply.rs:7:16 | ||
| | ||
LL | SmallVec<{ D * 2 }>:, | ||
| ^ cannot perform const operation using `D` | ||
| | ||
= help: const parameters may only be used as standalone arguments, i.e. `D` | ||
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions | ||
|
||
error[E0747]: constant provided when a type was expected | ||
--> $DIR/bad-multiply.rs:7:14 | ||
| | ||
LL | SmallVec<{ D * 2 }>:, | ||
| ^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0747`. |
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
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,12 +1,22 @@ | ||
error[E0046]: not all trait items implemented, missing: `RefTarget` | ||
--> $DIR/ice-type-error-in-tail-124031.rs:9:1 | ||
--> $DIR/ice-type-error-in-tail-124031.rs:11:1 | ||
| | ||
LL | type RefTarget; | ||
| -------------- `RefTarget` from trait | ||
... | ||
LL | impl Trait for () {} | ||
| ^^^^^^^^^^^^^^^^^ missing `RefTarget` in implementation | ||
|
||
error: aborting due to 1 previous error | ||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types | ||
--> $DIR/ice-type-error-in-tail-124031.rs:20:9 | ||
| | ||
LL | std::mem::transmute::<Option<()>, Option<&Other>>(None); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: source type: `Option<()>` ($BITS bits) | ||
= note: target type: `Option<&Other>` ($BITS bits) | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0046`. | ||
Some errors have detailed explanations: E0046, E0512. | ||
For more information about an error, try `rustc --explain E0046`. |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// regression test for #127351 | ||
|
||
#![feature(lazy_type_alias)] | ||
//~^ WARN the feature `lazy_type_alias` is incomplete | ||
|
||
type ExplicitTypeOutlives<T> = T; | ||
|
||
pub struct Warns { | ||
_significant_drop: ExplicitTypeOutlives, | ||
//~^ ERROR missing generics for type alias `ExplicitTypeOutlives` | ||
field: String, | ||
} | ||
|
||
pub fn test(w: Warns) { | ||
let _ = || drop(w.field); | ||
} | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/bad-lazy-type-alias.rs:3:12 | ||
| | ||
LL | #![feature(lazy_type_alias)] | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0107]: missing generics for type alias `ExplicitTypeOutlives` | ||
--> $DIR/bad-lazy-type-alias.rs:9:24 | ||
| | ||
LL | _significant_drop: ExplicitTypeOutlives, | ||
| ^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument | ||
| | ||
note: type alias defined here, with 1 generic parameter: `T` | ||
--> $DIR/bad-lazy-type-alias.rs:6:6 | ||
| | ||
LL | type ExplicitTypeOutlives<T> = T; | ||
| ^^^^^^^^^^^^^^^^^^^^ - | ||
help: add missing generic argument | ||
| | ||
LL | _significant_drop: ExplicitTypeOutlives<T>, | ||
| +++ | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0107`. |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:((((((((((( what the heck were we doing here!!