Skip to content

Rollup of 8 pull requests #141207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
684b7b7
don't depend on rustc_attr_parsing if rustc_data_structures will do
mejrs May 9, 2025
9ccabd5
Make some `f32`/`f64` tests also run in const-context
Urgau May 11, 2025
4a65aaf
Remove rustc_attr_data_structures re-export from rustc_attr_parsing
mejrs May 11, 2025
6128fca
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and inste…
dpaoliello May 15, 2025
8fcff8c
Add per page TOC in the rustc book
Urgau Apr 21, 2025
72f915a
Fix flicker when page loads
Urgau Apr 21, 2025
4cbcb44
Cleanup the Javascript and CSS of our custom TOC
Urgau Apr 21, 2025
84d7edd
Enable [behind-upstream] triagebot option for rust-lang/rust
xizheyin May 16, 2025
1adfdb4
Use `crate::` prefix for root macro suggestions
bvanjoi May 17, 2025
b3b2153
Update triagebot.toml
xizheyin May 17, 2025
65d381b
triagebot: fix Rust for Linux ping group rust-lang/rust label
jieyouxu May 17, 2025
2dddbd1
rustc-dev-guide: fix Rust for Linux rust-lang/rust label
jieyouxu May 17, 2025
cd22c1b
determine later whether an explicit reg was used
folkertdev Apr 29, 2025
5af9652
extract operand parser
folkertdev Apr 29, 2025
614c51a
a new parser generating the exact same error messages
folkertdev Apr 29, 2025
9191373
cleanup `parse_clobber_abi`
folkertdev Apr 29, 2025
d85ea45
cleanup `parse_options`
folkertdev Apr 29, 2025
3ca1a16
cleanup unused code
folkertdev Apr 29, 2025
b6bc513
more cleanup
folkertdev Apr 29, 2025
f457e4d
leave a note about maybe delaying an error message
folkertdev Apr 29, 2025
d7eb15d
attempt to have rustfmt use the new logic
folkertdev Apr 29, 2025
6e1bddc
Apply suggestions from code review
folkertdev May 3, 2025
1305fcc
delay error for unsupported options
folkertdev May 3, 2025
8e86a0e
rename to get rid of the 'raw' concept
folkertdev May 17, 2025
d91e3d3
add `AsmOptions` with some named fields
folkertdev May 17, 2025
5e426f0
Rollup merge of #140113 - Urgau:rustc-book-page-toc, r=ehuss
fmease May 18, 2025
d6694ae
Rollup merge of #140490 - folkertdev:asm-parser-changes, r=Amanieu,tr…
fmease May 18, 2025
bb24a71
Rollup merge of #140874 - mejrs:rads, r=WaffleLapkin
fmease May 18, 2025
c7c3d67
Rollup merge of #140924 - Urgau:f32_f64_const_tests, r=Mark-Simulacrum
fmease May 18, 2025
106bb65
Rollup merge of #141045 - dpaoliello:noarmhazard, r=jieyouxu
fmease May 18, 2025
5b9b911
Rollup merge of #141071 - xizheyin:behind-upstream, r=Urgau
fmease May 18, 2025
a94cf15
Rollup merge of #141132 - bvanjoi:issue-141082, r=fmease
fmease May 18, 2025
cf4f0ac
Rollup merge of #141139 - jieyouxu:fix-rfl, r=Urgau
fmease May 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
let Res::Def(DefKind::Macro(MacroKind::Bang), _) = binding.res() else {
return None;
};
let module_name = crate_module.kind.name().unwrap_or(kw::Empty);
let module_name = crate_module.kind.name().unwrap_or(kw::Crate);
let import_snippet = match import.kind {
ImportKind::Single { source, target, .. } if source != target => {
format!("{source} as {target}")
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/issue-99695-b.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod m {
pub struct other_item;
}

use ::nu;
use crate::nu;
pub use self::p::{other_item as _};
//~^ ERROR unresolved import `self::p::nu` [E0432]
//~| HELP a macro with this name exists at the root of the crate
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/issue-99695-b.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | pub use self::p::{nu, other_item as _};
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
help: a macro with this name exists at the root of the crate
|
LL ~ use ::nu;
LL ~ use crate::nu;
LL ~ pub use self::p::{other_item as _};
|

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//@ run-rustfix
//@ revisions: edition_2015 edition_2018
//@ [edition_2015] edition: 2015
//@ [edition_2018] edition: 2018

#![allow(unused, nonstandard_style)]
mod m {
#[macro_export]
Expand All @@ -8,7 +12,7 @@ mod m {

pub struct other_item;

use ::nu;
use crate::nu;
pub use self::{other_item as _};
//~^ ERROR unresolved import `self::nu` [E0432]
//~| HELP a macro with this name exists at the root of the crate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0432]: unresolved import `self::nu`
--> $DIR/issue-99695.rs:11:20
--> $DIR/issue-99695.rs:15:20
|
LL | pub use self::{nu, other_item as _};
| ^^ no `nu` in `m`
|
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
help: a macro with this name exists at the root of the crate
|
LL ~ use ::nu;
LL ~ use crate::nu;
LL ~ pub use self::{other_item as _};
|

Expand Down
21 changes: 21 additions & 0 deletions tests/ui/imports/issue-99695.edition_2018.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//@ run-rustfix
//@ revisions: edition_2015 edition_2018
//@ [edition_2015] edition: 2015
//@ [edition_2018] edition: 2018

#![allow(unused, nonstandard_style)]
mod m {
#[macro_export]
macro_rules! nu {
{} => {};
}

pub struct other_item;

use crate::nu;
pub use self::{other_item as _};
//~^ ERROR unresolved import `self::nu` [E0432]
//~| HELP a macro with this name exists at the root of the crate
}

fn main() {}
16 changes: 16 additions & 0 deletions tests/ui/imports/issue-99695.edition_2018.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
error[E0432]: unresolved import `self::nu`
--> $DIR/issue-99695.rs:15:20
|
LL | pub use self::{nu, other_item as _};
| ^^ no `nu` in `m`
|
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
help: a macro with this name exists at the root of the crate
|
LL ~ use crate::nu;
LL ~ pub use self::{other_item as _};
|

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0432`.
4 changes: 4 additions & 0 deletions tests/ui/imports/issue-99695.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//@ run-rustfix
//@ revisions: edition_2015 edition_2018
//@ [edition_2015] edition: 2015
//@ [edition_2018] edition: 2018

#![allow(unused, nonstandard_style)]
mod m {
#[macro_export]
Expand Down