| Age | Commit message (Collapse) | Author | Lines |
|
r=lcnr,traviscross
Stabilize `feature(generic_arg_infer)`
Fixes rust-lang/rust#85077
r? lcnr
cc ````@rust-lang/project-const-generics````
|
|
|
|
|
|
Document Ambig vs Unambig Type/Consts
|
|
|
|
|
|
`bootstrap-tools`
|
|
|
|
Fixes https://github.com/rust-lang/rust-analyzer/issues/20030
|
|
|
|
|
|
|
|
Right now it's used for functions with `fn_align`, in the future it will
get more uses (statics, struct fields, etc.)
|
|
|
|
Apply suggestions from code review
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
review comments
fix possible hang
|
|
Change __rust_no_alloc_shim_is_unstable to be a function
This fixes a long sequence of issues:
1. A customer reported that building for Arm64EC was broken: #138541
2. This was caused by a bug in my original implementation of Arm64EC support, namely that only functions on Arm64EC need to be decorated with `#` but Rust was decorating statics as well.
3. Once I corrected Rust to only decorate functions, I started linking failures where the linker couldn't find statics exported by dylib dependencies. This was caused by the compiler not marking exported statics in the generated DEF file with `DATA`, thus they were being exported as functions not data.
4. Once I corrected the way that the DEF files were being emitted, the linker started failing saying that it couldn't find `__rust_no_alloc_shim_is_unstable`. This is because the MSVC linker requires the declarations of statics imported from other dylibs to be marked with `dllimport` (whereas it will happily link to functions imported from other dylibs whether they are marked `dllimport` or not).
5. I then made a change to ensure that `__rust_no_alloc_shim_is_unstable` was marked as `dllimport`, but the MSVC linker started emitting warnings that `__rust_no_alloc_shim_is_unstable` was marked as `dllimport` but was declared in an obj file. This is a harmless warning which is a performance hint: anything that's marked `dllimport` must be indirected via an `__imp` symbol so I added a linker arg in the target to suppress the warning.
6. A customer then reported a similar warning when using `lld-link` (<https://github.com/rust-lang/rust/pull/140176#issuecomment-2872448443>). I don't think it was an implementation difference between the two linkers but rather that, depending on the obj that the declaration versus uses of `__rust_no_alloc_shim_is_unstable` landed in we would get different warnings, so I suppressed that warning as well: #140954.
7. Another customer reported that they weren't using the Rust compiler to invoke the linker, thus these warnings were breaking their build: <https://github.com/rust-lang/rust/pull/140176#issuecomment-2881867433>. At that point, my original change was reverted (#141024) leaving Arm64EC broken yet again.
Taking a step back, a lot of these linker issues arise from the fact that `__rust_no_alloc_shim_is_unstable` is marked as `extern "Rust"` in the standard library and, therefore, assumed to be a foreign item from a different crate BUT the Rust compiler may choose to generate it either in the current crate, some other crate that will be statically linked in OR some other crate that will by dynamically imported.
Worse yet, it is impossible while building a given crate to know if `__rust_no_alloc_shim_is_unstable` will statically linked or dynamically imported: it might be that one of its dependent crates is the one with an allocator kind set and thus that crate (which is compiled later) will decide depending if it has any dylib dependencies or not to import `__rust_no_alloc_shim_is_unstable` or generate it. Thus, there is no way to know if the declaration of `__rust_no_alloc_shim_is_unstable` should be marked with `dllimport` or not.
There is a simple fix for all this: there is no reason `__rust_no_alloc_shim_is_unstable` must be a static. It needs to be some symbol that must be linked in; thus, it could easily be a function instead. As a function, there is no need to mark it as `dllimport` when dynamically imported which avoids the entire mess above.
There may be a perf hit for changing the `volatile load` to be a `tail call`, so I'm happy to change that part back (although I question what the codegen of a `volatile load` would look like, and if the backend is going to try to use load-acquire semantics).
Build with this change applied BEFORE #140176 was reverted to demonstrate that there are no linking issues with either MSVC or MinGW: <https://github.com/rust-lang/rust/actions/runs/15078657205>
Incidentally, I fixed `tests/run-make/no-alloc-shim` to work with MSVC as I needed it to be able to test locally (FYI for #128602)
r? `@bjorn3`
cc `@jieyouxu`
|
|
|
|
We no longer error in this case!
|
|
|
|
|
|
|
|
Rewrite `inline` attribute parser to use new infrastructure and improve diagnostics for all parsed attributes
r? `@oli-obk`
This PR:
- creates a new parser for inline attributes
- creates consistent error messages and error codes between attribute parsers; inline and others
- as such changes a few error messages for other attributes to be (in my eyes) much more consistent
- tests ast-lowering lints introduced by rust-lang/rust#138164 since this is now useful for the first time
- Coalesce some useless error codes
Builds on top of rust-lang/rust#138164
Closes rust-lang/rust#137950
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#141574 (impl `Default` for `array::IntoIter`)
- rust-lang/rust#141608 (Add support for repetition to `proc_macro::quote`)
- rust-lang/rust#142100 (rustdoc: make srcIndex no longer a global variable)
- rust-lang/rust#142371 (avoid `&mut P<T>` in `visit_expr` etc methods)
- rust-lang/rust#142517 (Windows: Use anonymous pipes in Command)
- rust-lang/rust#142520 (alloc: less static mut + some cleanup)
- rust-lang/rust#142588 (Generic ctx imprv)
- rust-lang/rust#142605 (Don't unwrap in enzyme builds in case of missing llvm-config)
- rust-lang/rust#142608 (Refresh module-level docs for `rustc_target::spec`)
- rust-lang/rust#142618 (Lint about `console` calls in rustdoc JS)
- rust-lang/rust#142620 (Remove a panicking branch in `BorrowedCursor::advance`)
- rust-lang/rust#142631 (Dont suggest remove semi inside macro expansion for redundant semi lint)
- rust-lang/rust#142632 (Update cargo)
- rust-lang/rust#142635 (Temporarily add back -Zwasm-c-abi=spec)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Update cargo
6 commits in fc1518ef02b77327d70d4026b95ea719dd9b8c51..2251525ae503fa196f6d7f9ce6d32eccb2d5f044
2025-06-06 04:49:44 +0000 to 2025-06-16 22:01:27 +0000
- feat: Add custom completer for `cargo remove <TAB>` (rust-lang/cargo#15662)
- chore(deps): update msrv (3 versions) to v1.85 (rust-lang/cargo#15668)
- refactor: replace InternedString with Cow in IndexPackage (rust-lang/cargo#15559)
- highlight the correct words (rust-lang/cargo#15659)
- CHANGELOG.md: typo (rust-lang/cargo#15660)
- Use `Not::not` rather than a custom `is_false` function (rust-lang/cargo#15645)
|
|
Lint about `console` calls in rustdoc JS
As discussed [here](https://github.com/rust-lang/rust/pull/142100#discussion_r2151764395), this PR enforces that `console` is not used in rustdoc JS by default.
cc `@lolbinarycat`
|
|
Don't unwrap in enzyme builds in case of missing llvm-config
r? `@onur-ozkan`
For some reason x.py was now panicking in this location, so I also removed the unwrap here.
part 2 of https://github.com/rust-lang/rust/pull/140000, there shouldn't be other locations where we check for llvm-config.
|
|
avoid `&mut P<T>` in `visit_expr` etc methods
trying a different way than rust-lang/rust#141636
r? ghost
|
|
rustdoc: make srcIndex no longer a global variable
this is one-time initialization data, it can just
be a function parameter.
while we're doing that, we can more the json parsing into the function and save a few extra bytes of storage for free, at least in the case of multiple crates in a doc bundle.
fixes https://github.com/rust-lang/rust/issues/138467
|
|
|
|
Subtree update of `rust-analyzer`
r? `@ghost`
|
|
Rollup of 13 pull requests
Successful merges:
- rust-lang/rust#138538 (Make performance description of String::{insert,insert_str,remove} more precise)
- rust-lang/rust#141946 (std: refactor explanation of `NonNull`)
- rust-lang/rust#142216 (Miscellaneous RefCell cleanups)
- rust-lang/rust#142542 (Manually invalidate caches in SimplifyCfg.)
- rust-lang/rust#142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism)
- rust-lang/rust#142570 (Reject union default field values)
- rust-lang/rust#142584 (Handle same-crate macro for borrowck semicolon suggestion)
- rust-lang/rust#142585 (Update books)
- rust-lang/rust#142586 (Fold unnecessary `visit_struct_field_def` in AstValidator)
- rust-lang/rust#142587 (Make sure to propagate result from `visit_expr_fields`)
- rust-lang/rust#142595 (Revert overeager warning for misuse of `--print native-static-libs`)
- rust-lang/rust#142598 (Set elf e_flags on ppc64 targets according to abi)
- rust-lang/rust#142601 (Add a comment to `FORMAT_VERSION`.)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
This includes a fix for building on gnux32.
[1]: https://github.com/rust-lang/libc/releases/tag/0.2.174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hide imported privates if private editable is disabled
|