-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #69474 - Dylan-DPC:rollup-ciotplu, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - #67637 (Add primitive module to libcore) - #69387 (Deduplicate identifier printing a bit) - #69412 (Mark attributes consumed by `check_mod_attrs` as normal) - #69423 (syntax: Remove `Nt(Impl,Trait,Foreign)Item`) - #69429 (remove redundant clones and import) - #69457 (Clean up e0370 e0371) - #69468 ([master] Backport release notes of 1.41.1) Failed merges: r? @ghost
- Loading branch information
Showing
30 changed files
with
300 additions
and
119 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//! This module reexports the primitive types to allow usage that is not | ||
//! possibly shadowed by other declared types. | ||
//! | ||
//! This is normally only useful in macro generated code. | ||
//! | ||
//! An example of this is when generating a new struct and an impl for it: | ||
//! | ||
//! ```rust,compile_fail | ||
//! pub struct bool; | ||
//! | ||
//! impl QueryId for bool { | ||
//! const SOME_PROPERTY: bool = true; | ||
//! } | ||
//! | ||
//! # trait QueryId { const SOME_PROPERTY: core::primitive::bool; } | ||
//! ``` | ||
//! | ||
//! Note that the `SOME_PROPERTY` associated constant would not compile, as its | ||
//! type `bool` refers to the struct, rather than to the primitive bool type. | ||
//! | ||
//! A correct implementation could look like: | ||
//! | ||
//! ```rust | ||
//! # #[allow(non_camel_case_types)] | ||
//! pub struct bool; | ||
//! | ||
//! impl QueryId for bool { | ||
//! const SOME_PROPERTY: core::primitive::bool = true; | ||
//! } | ||
//! | ||
//! # trait QueryId { const SOME_PROPERTY: core::primitive::bool; } | ||
//! ``` | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use bool; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use char; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use f32; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use f64; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use i128; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use i16; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use i32; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use i64; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use i8; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use isize; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use str; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use u128; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use u16; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use u32; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use u64; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use u8; | ||
#[stable(feature = "core_primitive", since = "1.43.0")] | ||
pub use usize; |
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
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
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.