You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled across this while defining a Result alias. Consider the following code:
pub type Result<T> = std::result::Result<T, ()>;
pub mod example1 {
use std::result::Result as StdResult;
pub type Result<T> = StdResult<T, ()>;
}
pub mod example2 {
pub type Result<T> = std::result::Result<T, ()>;
}
The first two work, while it turns out that for the third definition, I'd need to write ::std::result::Result. The error is this:
error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
--> example/src/lib.rs:10:26
|
10 | pub type Result<T> = std::result::Result<T, ()>;
| ^^^
|
= help: add #![feature(extern_prelude)] to the crate attributes to enable
I'm not sure what difference the compiler sees in the access variants, but the fix was not to activate an experimental feature. If the behavior is intended, maybe add the option to use an absolute reference to the hints?
I stumbled across this while defining a
Result
alias. Consider the following code:The first two work, while it turns out that for the third definition, I'd need to write
::std::result::Result
. The error is this:I'm not sure what difference the compiler sees in the access variants, but the fix was not to activate an experimental feature. If the behavior is intended, maybe add the option to use an absolute reference to the hints?
The text was updated successfully, but these errors were encountered: