-
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
Fix ICE in const_trait check code #102361
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#![feature(allocator_api)] | ||
#![feature(const_trait_impl)] | ||
|
||
use core::convert::{From, TryFrom}; | ||
//~^ ERROR | ||
//~| ERROR | ||
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add the error code to make it a tad clearer, or is it mostly unnecessary for this case? Not sure on the error annotations guidelines. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The errors are expected, but checking the error message is mostly unnecessary because we are only ensuring that it doesn't ICE. |
||
|
||
use std::pin::Pin; | ||
use std::alloc::Allocator; | ||
impl<T: ?Sized, A: Allocator> const From<Box<T, A>> for Pin<Box<T, A>> | ||
where | ||
A: 'static, | ||
{} | ||
|
||
pub fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0433]: failed to resolve: maybe a missing crate `core`? | ||
--> $DIR/issue-102156.rs:4:5 | ||
| | ||
LL | use core::convert::{From, TryFrom}; | ||
| ^^^^ maybe a missing crate `core`? | ||
| | ||
= help: consider adding `extern crate core` to use the `core` crate | ||
|
||
error[E0433]: failed to resolve: maybe a missing crate `core`? | ||
--> $DIR/issue-102156.rs:4:5 | ||
| | ||
LL | use core::convert::{From, TryFrom}; | ||
| ^^^^ maybe a missing crate `core`? | ||
| | ||
= help: consider adding `extern crate core` to use the `core` crate | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0433`. |
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.
Do we want to return here or break out of the block so that
intravisit::walk_item
still runs?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.
Done.