forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#135576 - matthiaskrgr:rollup-e38vft0, r=matth…
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133720 ([cfg_match] Adjust syntax) - rust-lang#134496 (Update documentation for Arc::from_raw, Arc::increment_strong_count, and Arc::decrement_strong_count to clarify allocator requirement) - rust-lang#134754 (Implement `use` associated items of traits) - rust-lang#135249 (Fix overflows in the implementation of `overflowing_literals` lint's help) - rust-lang#135251 (Only treat plain literal patterns as short) - rust-lang#135556 (Clarify note in `std::sync::LazyLock` example) - rust-lang#135560 (Update `compiler-builtins` to 0.1.144) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
37 changed files
with
1,009 additions
and
88 deletions.
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 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,19 +1,19 @@ | ||
Attempt was made to import an unimportable value. This can happen when trying | ||
to import a method from a trait. | ||
Attempt was made to import an unimportable type. This can happen when trying | ||
to import a type from a trait. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0253 | ||
mod foo { | ||
pub trait MyTrait { | ||
fn do_something(); | ||
type SomeType; | ||
} | ||
} | ||
use foo::MyTrait::do_something; | ||
// error: `do_something` is not directly importable | ||
use foo::MyTrait::SomeType; | ||
// error: `SomeType` is not directly importable | ||
fn main() {} | ||
``` | ||
|
||
It's invalid to directly import methods belonging to a trait or concrete type. | ||
It's invalid to directly import types belonging to a trait. |
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
Oops, something went wrong.