about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-06-16Merge pull request #19994 from sourcefrog/book-linksLaurențiu Nicola-3/+2
Fix some links in the book
2025-06-15Rollup merge of #134661 - dtolnay:prefixattr, r=fmeaseLeón Orell Valerian Liehr-11/+11
Reduce precedence of expressions that have an outer attr Previously, `-Zunpretty=expanded` would expand this program as follows: ```rust #![feature(stmt_expr_attributes)] macro_rules! repro { ($e:expr) => { #[allow(deprecated)] $e }; } #[derive(Default)] struct Thing { #[deprecated] field: i32, } fn main() { let thing = Thing::default(); let _ = repro!(thing).field; } ``` ```rs #![feature(prelude_import)] #![feature(stmt_expr_attributes)] #[prelude_import] use std::prelude::rust_2021::*; #[macro_use] extern crate std; struct Thing { #[deprecated] field: i32, } #[automatically_derived] impl ::core::default::Default for Thing { #[inline] fn default() -> Thing { Thing { field: ::core::default::Default::default() } } } fn main() { let thing = Thing::default(); let _ = #[allow(deprecated)] thing.field; } ``` This is not the correct expansion. The correct output would have `(#[allow(deprecated)] thing).field` with the attribute applying only to `thing`, not to `thing.field`.
2025-06-15Merge pull request #20000 from tadeokondrak/lifetime-repeat-macroChayim Refael Friedman-14/+63
Allow lifetime repeats in macros: $($x)'a*
2025-06-15Use is_any_identifier in pretty_print_macro_expansionTadeo Kondrak-13/+6
2025-06-15Fix spacing for LIFETIME_IDENT near keywords and literals in test outputTadeo Kondrak-4/+12
2025-06-15Un-remap `rustc-dev` component pathsUrgau-0/+6
2025-06-15Stabilize "file_lock" featureChristopher Berner-2/+1
2025-06-15clarify `rustc_do_not_const_check` commentDeadbeef-1/+1
2025-06-15Merge from rustcRalf Jung-49/+5
2025-06-15Preparing for merge from rustcRalf Jung-1/+1
2025-06-15Merge pull request #20009 from Veykril/push-rvnnorzvpnqvLukas Wirth-73/+136
Optimize `pub(crate)` and `pub(self)` visibility resolution
2025-06-15Optimize private visibility resolutionLukas Wirth-39/+83
2025-06-15Optimize `pub(crate)` visibility resolutionLukas Wirth-36/+55
2025-06-15Merge pull request #20008 from Veykril/push-rsnkrwyplmwrLukas Wirth-137/+120
More idiomatic salsa use
2025-06-15Unify assoc item visibility queriesLukas Wirth-77/+58
2025-06-15Idiomatic salsa use for extern block abi queryLukas Wirth-13/+16
2025-06-15Idiomatic salsa use for impl items queryLukas Wirth-41/+40
2025-06-15Replace unnecessary use of `MacroDefId` with `MacroId`Lukas Wirth-6/+6
2025-06-15Merge pull request #20007 from Veykril/push-opqzsnwzwyvnLukas Wirth-77/+81
Idiomatic salsa use for enum variants query
2025-06-15Idiomatic salsa use for enum variants queryLukas Wirth-77/+81
2025-06-15Merge pull request #20006 from Veykril/push-uvmuznvlwsxxLukas Wirth-213/+692
Cleanup incremental tests and verify query executions
2025-06-15Cleanup incremental testsLukas Wirth-213/+692
2025-06-15Implement pinned borrows, part of `pin_ergonomics`Frank King-0/+19
2025-06-15Merge pull request #19996 from LHolten/exclude-importsChayim Refael Friedman-1/+214
Add support for excluding imports from symbol search
2025-06-15Add config option to exclude imports from symbol searchLucas Holten-1/+214
2025-06-15cargo updategithub-actions-46/+40
compiler & tools dependencies: Locking 31 packages to latest compatible versions Updating adler2 v2.0.0 -> v2.0.1 Updating cfg-if v1.0.0 -> v1.0.1 Updating clap v4.5.39 -> v4.5.40 Updating clap_builder v4.5.39 -> v4.5.40 Updating clap_derive v4.5.32 -> v4.5.40 Updating clap_lex v0.7.4 -> v0.7.5 Updating getopts v0.2.21 -> v0.2.23 Updating hermit-abi v0.5.1 -> v0.5.2 Updating jiff v0.2.14 -> v0.2.15 Updating jiff-static v0.2.14 -> v0.2.15 Updating libc v0.2.172 -> v0.2.173 Updating memchr v2.7.4 -> v2.7.5 Updating minifier v0.3.5 -> v0.3.6 Updating miniz_oxide v0.8.8 -> v0.8.9 Updating object v0.37.0 -> v0.37.1 Updating redox_syscall v0.5.12 -> v0.5.13 Updating rustc-demangle v0.1.24 -> v0.1.25 Updating syn v2.0.101 -> v2.0.103 Updating thread_local v1.1.8 -> v1.1.9 Updating unicode-width v0.2.0 -> v0.2.1 Updating wasi v0.11.0+wasi-snapshot-preview1 -> v0.11.1+wasi-snapshot-preview1 Updating wasm-encoder v0.233.0 -> v0.235.0 Removing wasmparser v0.232.0 Removing wasmparser v0.233.0 Adding wasmparser v0.234.0 Adding wasmparser v0.235.0 Updating wast v233.0.0 -> v235.0.0 Updating wat v1.233.0 -> v1.235.0 Updating windows v0.61.1 -> v0.61.3 Updating windows-link v0.1.1 -> v0.1.3 Adding windows-sys v0.60.2 Updating windows-targets v0.53.0 -> v0.53.2 Updating winnow v0.7.10 -> v0.7.11 note: pass `--verbose` to see 39 unchanged dependencies behind latest library dependencies: Locking 1 package to latest compatible version Updating libc v0.2.172 -> v0.2.173 note: pass `--verbose` to see 4 unchanged dependencies behind latest rustbook dependencies: Locking 19 packages to latest compatible versions Updating adler2 v2.0.0 -> v2.0.1 Updating cc v1.2.26 -> v1.2.27 Updating cfg-if v1.0.0 -> v1.0.1 Updating clap v4.5.39 -> v4.5.40 Updating clap_builder v4.5.39 -> v4.5.40 Updating clap_complete v4.5.52 -> v4.5.54 Updating clap_derive v4.5.32 -> v4.5.40 Updating clap_lex v0.7.4 -> v0.7.5 Updating getopts v0.2.21 -> v0.2.23 Updating jiff v0.2.14 -> v0.2.15 Updating jiff-static v0.2.14 -> v0.2.15 Updating libc v0.2.172 -> v0.2.173 Updating memchr v2.7.4 -> v2.7.5 Updating miniz_oxide v0.8.8 -> v0.8.9 Updating redox_syscall v0.5.12 -> v0.5.13 Updating syn v2.0.101 -> v2.0.103 Removing unicode-width v0.1.14 Removing unicode-width v0.2.0 Adding unicode-width v0.2.1 Updating windows-link v0.1.1 -> v0.1.3 Updating winnow v0.7.10 -> v0.7.11
2025-06-15Implement `simd_round_ties_even` for miri, cg_clif and cg_gccsayantn-0/+10
2025-06-14Rollup merge of #141811 - mejrs:bye_locals, r=compiler-errorsMatthias Krüger-48/+5
Unimplement unsized_locals Implements https://github.com/rust-lang/compiler-team/issues/630 Tracking issue here: https://github.com/rust-lang/rust/issues/111942 Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`. There may be more that should be removed (possibly in follow up prs) - the `forget_unsized` function and `forget` intrinsic. - the `unsized_locals` test directory; I've just fixed up the tests for now - various codegen support for unsized values and allocas cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3`` ``@rustbot`` label F-unsized_locals Fixes rust-lang/rust#79409
2025-06-14Rollup merge of #140593 - m-ou-se:some-temp, r=NadrierilMatthias Krüger-1/+0
Temporary lifetime extension through tuple struct and tuple variant constructors This makes temporary lifetime extension work for tuple struct and tuple variant constructors, such as `Some()`. Before: ```rust let a = &temp(); // Extended let a = Some(&temp()); // Not extended :( let a = Some { 0: &temp() }; // Extended ``` After: ```rust let a = &temp(); // Extended let a = Some(&temp()); // Extended let a = Some { 0: &temp() }; // Extended ``` So, with this change, this works: ```rust let a = Some(&String::from("hello")); // New: String lifetime now extended! println!("{a:?}"); ``` Until now, we did not extend through tuple struct/variant constructors (like `Some`), because they are function calls syntactically, and we do not want to extend the String lifetime in: ```rust let a = some_function(&String::from("hello")); // String not extended! ``` However, it turns out to be very easy to distinguish between regular functions and constructors at the point where we do lifetime extension. In practice, constructors nearly always use UpperCamelCase while regular functions use lower_snake_case, so it should still be easy to for a human programmer at the call site to see whether something qualifies for lifetime extension or not. This needs a lang fcp. --- More examples of what will work after this change: ```rust let x = Person { name: "Ferris", job: Some(&Job { // `Job` now extended! title: "Chief Rustacean", organisation: "Acme Ltd.", }), }; dbg!(x); ``` ```rust let file = if use_stdout { None } else { Some(&File::create("asdf")?) // `File` now extended! }; set_logger(file); ``` ```rust use std::path::Component; let c = Component::Normal(&OsString::from(format!("test-{num}"))); // OsString now extended! assert_eq!(path.components.first().unwrap(), c); ```
2025-06-14Merge from rustcRalf Jung-2/+3
2025-06-14Preparing for merge from rustcRalf Jung-1/+1
2025-06-14Merge pull request #19984 from WaffleLapkin/unprefer_alignLukas Wirth-9/+13
remove `pref_align_of` intrinsic handling, rename `{min_=>}align_of{,_val}`
2025-06-14fmtThe Miri Cronjob Bot-10/+2
2025-06-14Merge from rustcThe Miri Cronjob Bot-1852/+6633
2025-06-14Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-13Rollup merge of #142461 - Enselic:no-capture-tip, r=jieyouxuJubilee-0/+1
compiletest: Clarify that `--no-capture` is needed with `--verbose` Confusingly, this does not make compile test print what command is used to run a ui test: ./x test tests/ui/panics/abort-on-panic.rs --verbose It is also necessary to pass `--no-capture`, like this: ./x test tests/ui/panics/abort-on-panic.rs --verbose --no-capture Then you will see prints like this: executing cd "/rust/build/x86_64-unknown-linux-gnu/test/ui/panics/abort-on-panic.next" && \ RUSTC="/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" \ RUST_TEST_THREADS="32" \ "/rust/build/x86_64-unknown-linux-gnu/test/ui/panics/abort-on-panic.next/a" Add a hint in the code for this that would have helped me figure this out. (See https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/compiltest.20show.20rustc.20commands.3F for some more context.)
2025-06-13Reduce precedence of expressions that have an outer attrDavid Tolnay-11/+11
2025-06-13Allow lifetime repeats in macros: $($x)'a*Tadeo Kondrak-8/+56
This works in rustc. This change isn't motivated by any real code. I just learned about it and decided to see why it doesn't work with rust-analyzer.
2025-06-13remove `pref_align_of` intrinsic handling, rename `{min_=>}align_of{,_val}`Waffle Lapkin-9/+13
2025-06-13TypeVisiting binders no longer requires TypeFolding its interiorMichael Goulet-2/+2
2025-06-13Merge pull request #19997 from Veykril/push-xltylvqtpwzxLukas Wirth-42/+19
Remove `InternedCallableDefId`
2025-06-13compiletest: Clarify that `--no-capture` is needed with `--verbose`Martin Nordholts-0/+1
Confusingly, this does not make compile test print what command is used to run a ui test: ./x test tests/ui/panics/abort-on-panic.rs --verbose It is also necessary to pass `--no-capture`, like this: ./x test tests/ui/panics/abort-on-panic.rs --verbose --no-capture Now you will see prints like this: executing cd "/rust/build/x86_64-unknown-linux-gnu/test/ui/panics/abort-on-panic.next" && \ RUSTC="/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" \ RUST_TEST_THREADS="32" \ "/rust/build/x86_64-unknown-linux-gnu/test/ui/panics/abort-on-panic.next/a" Add a hint in the code for this that would have helped me figure this out.
2025-06-13Remove `InternedCallableDefId`Lukas Wirth-42/+19
It's unnecessary
2025-06-13Turn `BlockId` into a `#[salsa::tracked]`Lukas Wirth-12/+28
2025-06-13Auto merge of #142451 - flip1995:clippy-subtree-update, r=Manishearthbors-668/+4109
Clippy subtree update r? `@Manishearth` 1 day late. Got distracted yesterday evening and forgot about it.
2025-06-13Make the URL a hyperlinkMartin Pool-1/+1
2025-06-13Fix link to the contribution guideMartin Pool-2/+1
2025-06-13Use `ThinVec` in `ItemScope` in a couple placesLukas Wirth-19/+17
2025-06-13Bring back EMPTY item tree deduplicationLukas Wirth-16/+37
2025-06-13Auto merge of #142442 - matthiaskrgr:rollup-6yodjfx, r=matthiaskrgrbors-11/+6
Rollup of 10 pull requests Successful merges: - rust-lang/rust#134847 (Implement asymmetrical precedence for closures and jumps) - rust-lang/rust#141491 (Delegate `<CStr as Debug>` to `ByteStr`) - rust-lang/rust#141770 (Merge `Cfg::render_long_html` and `Cfg::render_long_plain` methods common code) - rust-lang/rust#142069 (Introduce `-Zmacro-stats`) - rust-lang/rust#142158 (Tracking the old name of renamed unstable library features) - rust-lang/rust#142221 ([AIX] strip underlying xcoff object) - rust-lang/rust#142340 (miri: we can use apfloat's mul_add now) - rust-lang/rust#142379 (Add bootstrap option to compile a tool with features) - rust-lang/rust#142410 (intrinsics: rename min_align_of to align_of) - rust-lang/rust#142413 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup