Skip to content

Commit bd0b4f6

Browse files
committed
Auto merge of #65483 - Centril:rollup-txu60ss, r=Centril
Rollup of 8 pull requests Successful merges: - #65094 (Prefer statx on linux if available) - #65316 (make File::try_clone produce non-inheritable handles on Windows) - #65319 (InterpCx: make memory field public) - #65461 (Don't recommend ONCE_INIT in std::sync::Once) - #65465 (Move syntax::ext to a syntax_expand and refactor some attribute logic) - #65469 (Update libc to 0.2.64) - #65475 (add example for type_name) - #65478 (fmt::Write is about string slices, not byte slices) Failed merges: r? @ghost
2 parents c8fa82c + c10e5c4 commit bd0b4f6

File tree

133 files changed

+965
-638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+965
-638
lines changed

Cargo.lock

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,9 +1713,9 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
17131713

17141714
[[package]]
17151715
name = "libc"
1716-
version = "0.2.62"
1716+
version = "0.2.64"
17171717
source = "registry+https://github.com/rust-lang/crates.io-index"
1718-
checksum = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
1718+
checksum = "74dfca3d9957906e8d1e6a0b641dc9a59848e793f1da2165889fd4f62d10d79c"
17191719
dependencies = [
17201720
"rustc-std-workspace-core",
17211721
]
@@ -3112,6 +3112,7 @@ dependencies = [
31123112
"serialize",
31133113
"smallvec",
31143114
"syntax",
3115+
"syntax_expand",
31153116
"syntax_pos",
31163117
]
31173118

@@ -3427,6 +3428,7 @@ dependencies = [
34273428
"rustc_target",
34283429
"serialize",
34293430
"syntax",
3431+
"syntax_expand",
34303432
"syntax_pos",
34313433
"tempfile",
34323434
]
@@ -3559,6 +3561,7 @@ dependencies = [
35593561
"serialize",
35603562
"smallvec",
35613563
"syntax",
3564+
"syntax_expand",
35623565
"syntax_ext",
35633566
"syntax_pos",
35643567
"tempfile",
@@ -3630,6 +3633,7 @@ dependencies = [
36303633
"smallvec",
36313634
"stable_deref_trait",
36323635
"syntax",
3636+
"syntax_expand",
36333637
"syntax_pos",
36343638
]
36353639

@@ -3678,6 +3682,7 @@ dependencies = [
36783682
"rustc_index",
36793683
"rustc_target",
36803684
"syntax",
3685+
"syntax_expand",
36813686
"syntax_pos",
36823687
]
36833688

@@ -3695,6 +3700,7 @@ dependencies = [
36953700
"rustc",
36963701
"rustc_metadata",
36973702
"syntax",
3703+
"syntax_expand",
36983704
"syntax_pos",
36993705
]
37003706

@@ -3723,6 +3729,7 @@ dependencies = [
37233729
"rustc_metadata",
37243730
"smallvec",
37253731
"syntax",
3732+
"syntax_expand",
37263733
"syntax_pos",
37273734
]
37283735

@@ -4336,6 +4343,25 @@ dependencies = [
43364343
"syntax_pos",
43374344
]
43384345

4346+
[[package]]
4347+
name = "syntax_expand"
4348+
version = "0.0.0"
4349+
dependencies = [
4350+
"bitflags",
4351+
"lazy_static 1.3.0",
4352+
"log",
4353+
"rustc_data_structures",
4354+
"rustc_errors",
4355+
"rustc_index",
4356+
"rustc_lexer",
4357+
"rustc_target",
4358+
"scoped-tls",
4359+
"serialize",
4360+
"smallvec",
4361+
"syntax",
4362+
"syntax_pos",
4363+
]
4364+
43394365
[[package]]
43404366
name = "syntax_ext"
43414367
version = "0.0.0"
@@ -4347,6 +4373,7 @@ dependencies = [
43474373
"rustc_target",
43484374
"smallvec",
43494375
"syntax",
4376+
"syntax_expand",
43504377
"syntax_pos",
43514378
]
43524379

src/libcore/any.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,15 @@ impl TypeId {
445445
///
446446
/// The current implementation uses the same infrastructure as compiler
447447
/// diagnostics and debuginfo, but this is not guaranteed.
448+
///
449+
/// # Example
450+
///
451+
/// ```rust
452+
/// assert_eq!(
453+
/// std::any::type_name::<Option<String>>(),
454+
/// "core::option::Option<alloc::string::String>",
455+
/// );
456+
/// ```
448457
#[stable(feature = "type_name", since = "1.38.0")]
449458
#[rustc_const_unstable(feature = "const_type_name")]
450459
pub const fn type_name<T: ?Sized>() -> &'static str {

src/libcore/fmt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ pub struct Error;
108108
/// [`io::Write`]: ../../std/io/trait.Write.html
109109
#[stable(feature = "rust1", since = "1.0.0")]
110110
pub trait Write {
111-
/// Writes a slice of bytes into this writer, returning whether the write
111+
/// Writes a string slice into this writer, returning whether the write
112112
/// succeeded.
113113
///
114-
/// This method can only succeed if the entire byte slice was successfully
114+
/// This method can only succeed if the entire string slice was successfully
115115
/// written, and this method will not return until all data has been
116116
/// written or an error occurs.
117117
///

src/librustc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ rustc_index = { path = "../librustc_index" }
2929
errors = { path = "../librustc_errors", package = "rustc_errors" }
3030
rustc_serialize = { path = "../libserialize", package = "serialize" }
3131
syntax = { path = "../libsyntax" }
32+
syntax_expand = { path = "../libsyntax_expand" }
3233
syntax_pos = { path = "../libsyntax_pos" }
3334
backtrace = "0.3.3"
3435
parking_lot = "0.9"

src/librustc/hir/def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::ty;
66
use crate::util::nodemap::DefIdMap;
77

88
use syntax::ast;
9-
use syntax::ext::base::MacroKind;
9+
use syntax_expand::base::MacroKind;
1010
use syntax::ast::NodeId;
1111
use syntax_pos::Span;
1212
use rustc_macros::HashStable;

src/librustc/hir/lowering.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ use syntax::ast;
6464
use syntax::ptr::P as AstP;
6565
use syntax::ast::*;
6666
use syntax::errors;
67-
use syntax::ext::base::SpecialDerives;
68-
use syntax::ext::hygiene::ExpnId;
67+
use syntax_expand::base::SpecialDerives;
6968
use syntax::print::pprust;
70-
use syntax::tokenstream::{TokenStream, TokenTree};
7169
use syntax::parse::token::{self, Nonterminal, Token};
70+
use syntax::tokenstream::{TokenStream, TokenTree};
7271
use syntax::sess::ParseSess;
7372
use syntax::source_map::{respan, ExpnData, ExpnKind, DesugaringKind, Spanned};
7473
use syntax::symbol::{kw, sym, Symbol};
7574
use syntax::visit::{self, Visitor};
75+
use syntax_pos::hygiene::ExpnId;
7676
use syntax_pos::Span;
7777

7878
const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;

src/librustc/hir/lowering/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use smallvec::SmallVec;
1818
use syntax::attr;
1919
use syntax::ast::*;
2020
use syntax::visit::{self, Visitor};
21-
use syntax::ext::base::SpecialDerives;
21+
use syntax_expand::base::SpecialDerives;
2222
use syntax::source_map::{respan, DesugaringKind, Spanned};
2323
use syntax::symbol::{kw, sym};
2424
use syntax_pos::Span;

src/librustc/hir/map/def_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::hir::map::definitions::*;
22
use crate::hir::def_id::DefIndex;
33

44
use syntax::ast::*;
5-
use syntax::ext::hygiene::ExpnId;
5+
use syntax_expand::hygiene::ExpnId;
66
use syntax::visit;
77
use syntax::symbol::{kw, sym};
88
use syntax::parse::token::{self, Token};

src/librustc/hir/map/definitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::borrow::Borrow;
1717
use std::fmt::Write;
1818
use std::hash::Hash;
1919
use syntax::ast;
20-
use syntax::ext::hygiene::ExpnId;
20+
use syntax_expand::hygiene::ExpnId;
2121
use syntax::symbol::{Symbol, sym, InternedString};
2222
use syntax_pos::{Span, DUMMY_SP};
2323

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_data_structures::svh::Svh;
2020
use rustc_index::vec::IndexVec;
2121
use syntax::ast::{self, Name, NodeId};
2222
use syntax::source_map::Spanned;
23-
use syntax::ext::base::MacroKind;
23+
use syntax_expand::base::MacroKind;
2424
use syntax_pos::{Span, DUMMY_SP};
2525

2626
pub mod blocks;

0 commit comments

Comments
 (0)