Skip to content
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

Rollup of 8 pull requests #136654

Closed
wants to merge 101 commits into from
Closed

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

folkertdev and others added 30 commits December 5, 2024 16:44
Also this generates an error when `repr` is used on a trait method and
the `fn_align` feature is not enabled. Looks like that was missed here:

https://github.com/rust-lang/rust/pull/110313/files

Which first enables the align attribute on trait methods.
Counting in bytes for a pointer to `u8` is legitimate and must not
trigger the lint. Also, this prevents linting the
`{std,core}::ptr::write_bytes` as it manipulates bytes.
as well as `HashMap::get_many_unchecked_mut` to
`HashMap::get_disjoint_unchecked_mut`.
changelog: [`needless_option_take`]: add autofix
…estion (rust-lang#13990)

fix rust-lang#13959

The current implementation of the `write_literal` and `print_literal`
lint performs escaping for the second argument of `write!` ,`writeln!`,
`print!` and `println!` of the suggestion by first replacing `"` with
`\"`, and then replacing `\` with `\\`. Performing these replacements in
this order may lead to unnecessary backslashes being added if the
original code contains `"` (e.g. `"` -> `\\"`), potentially resulting in
a suggestion that causes the code to fail to compile.
In the issue mentioned above, it’s suggested to use raw strings as raw
strings, but implementing this would require an ad-hoc change to the
current implementation, so it has been deferred. (I'll implement this in
another PR)

changelog: [`write_literal`]: fix incorrect escaping of suggestions
changelog: [`print_literal`]: fix incorrect escaping of suggestions
…#13894)

Closes rust-lang#11434 by moving `format_push_string` and `format_collect` to
pedantic.

changelog: Move `format_push_string` and `format_collect` to pedantic
…d-in-new-solver, r=lcnr

Do not consider child bound assumptions for rigid alias

r? lcnr

See first commit for the important details. For second commit, I also stacked a somewhat opinionated name change, though I can separate that if needed.

Fixes rust-lang/trait-system-refactor-initiative#149
Refactor FnKind variant to hold &Fn

Pulling the change suggested in rust-lang#128045 to reduce the impact of changing `Fn` item.

r? `@oli-obk`
flip1995 and others added 13 commits February 6, 2025 13:48
r? @ghost

changelog: none
…r=compiler-errors

disallow `repr()` on invalid items

fixes rust-lang#129606
fixes rust-lang#132391

Disallows `repr()` (so a repr with no arguments) on items where that won't ever make sense.

Also this generates an error when `repr` is used on a trait method and the `fn_align` feature is not enabled. Looks like that was missed here:

https://github.com/rust-lang/rust/pull/110313/files

Which first accepts the align attribute on trait methods.

r? `@compiler-errors`

cc `@jdonszelmann` who claimed rust-lang#132391 and generally has been working on attributes
…ler-errors

Document some safety constraints and use more safe wrappers

Lots of unsafe codegen_llvm code has safe wrappers already, so I used some of them and added some where applicable. I stopped here because this diff is large enough and should probably be reviewed independently of other changes.
…piler-errors

Simplify slice indexing in next trait solver

Unless I'm missing something:
- no need to explicitly specify the end of the slice as the end of the index range
- the `assert` is redundant since the indexing will panic for the same condition

I think this change simplifies it a bit. Also replaced the `for` loop of `push`es with a call to `extend` with an iterator. Might improve performance since it knows how many elements will be added beforehand and can pre-reserve room?

r? `@compiler-errors` , I think
…shtriplett

Stabilize `map_many_mut` feature

This PR stabilize `HashMap::get_many_mut` as `HashMap::get_disjoint_mut` and `HashMap::get_many_unchecked_mut` as `HashMap::get_disjoint_unchecked_mut` per FCP.

FCP at rust-lang#97601 (comment)
Fixes rust-lang#97601
r? libs
…er-errors

Misc. `rustc_hir` cleanups 🧹

Each commit stands on its own, but I think all of them make the code a bit cleaner
Couple of changes to run rustc in miri

This is not the full set of patches required to run rustc in miri, but it is the fast majority of the changes to rustc itself. There is also a change to the jobserver crate necessary and on arm64 a change to the memchr crate. Running rustc in miri has already found some UB: rust-lang#136579

cc rust-lang#135870 (comment)
…rrors

Couple of minor cleanups to the diagnostic infrastructure
…Manishearth

Clippy subtree update

r? `@Manishearth`
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Feb 6, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 6, 2025

📌 Commit bace62d has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 6, 2025
@bors
Copy link
Contributor

bors commented Feb 6, 2025

⌛ Testing commit bace62d with merge 9afc5d3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#133925 (disallow `repr()` on invalid items)
 - rust-lang#135549 (Document some safety constraints and use more safe wrappers)
 - rust-lang#136069 (Simplify slice indexing in next trait solver)
 - rust-lang#136152 (Stabilize `map_many_mut` feature)
 - rust-lang#136219 (Misc. `rustc_hir` cleanups 🧹)
 - rust-lang#136580 (Couple of changes to run rustc in miri)
 - rust-lang#136636 (Couple of minor cleanups to the diagnostic infrastructure)
 - rust-lang#136645 (Clippy subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] alloc test:false 4.793
[RUSTC-TIMING] hashbrown test:false 0.977
error: linking with `link.exe` failed: exit code: 1169
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX64\\x64\\link.exe" "/DEF:C:\\a\\_temp\\msys64\\tmp\\rustcaFiwiD\\lib.def" "/NOLOGO" "C:\\a\\_temp\\msys64\\tmp\\rustcaFiwiD\\symbols.o" "<1 object files omitted>" "<sysroot>-std\\x86_64-pc-windows-msvc\\release\\deps\\std-6f442565b1185c16.dibj03suybx6zgjs72x4n5hb2.rcgu.rmeta" "<1 object files omitted>" "kernel32.lib" "kernel32.lib" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-std\\x86_64-pc-windows-msvc\\release\\deps/{libpanic_unwind-2473e2b7b8a211e0.rlib,libwindows_targets-8022d5174a00c640.rlib,librustc_demangle-75cd39ec713b60f0.rlib,libstd_detect-e684704ed3d3ac25.rlib,libhashbrown-a3b009df2e3b46c1.rlib,librustc_std_workspace_alloc-8aca0857309dd6b7.rlib,libunwind-b0a34dad83fdca2f.rlib,libcfg_if-e3e2f175f7a1ab52.rlib,liballoc-079888b81cbe4b5b.rlib,librustc_std_workspace_core-d29c0a0fa0f7b830.rlib,libcore-e7e479fb40ef23c5.rlib,libcompiler_builtins-2a2dd07e9dae5199.rlib}.rlib" "advapi32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:libcmt" "C:\\a\\_temp\\msys64\\tmp\\rustcaFiwiD\\bcryptprimitives.dll_imports.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcaFiwiD\\api-ms-win-core-synch-l1-2-0.dll_imports.lib" "/NXCOMPAT" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x64" "/LIBPATH:<sysroot>-std\\x86_64-pc-windows-msvc\\release\\build\\compiler_builtins-e618639519d405b1\\out" "/OUT:<sysroot>-std\\x86_64-pc-windows-msvc\\release\\deps\\std-6f442565b1185c16.dll" "/OPT:REF,ICF" "/DLL" "/IMPLIB:<sysroot>-std\\x86_64-pc-windows-msvc\\release\\deps\\std-6f442565b1185c16.dll.lib" "/DEBUG" "/PDBALTPATH:%_PDB%"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: liballoc-079888b81cbe4b5b.rlib(alloc-079888b81cbe4b5b.alloc.1ce77c2b269d774-cgu.0.rcgu.o) : error LNK2005: __imp___rust_no_alloc_shim_is_unstable already defined in std-6f442565b1185c16.std.52c7e1c1069d9b0a-cgu.0.rcgu.o␍
          liballoc-079888b81cbe4b5b.rlib(alloc-079888b81cbe4b5b.alloc.1ce77c2b269d774-cgu.0.rcgu.o) : error LNK2005: __imp___rust_alloc_error_handler_should_panic already defined in std-6f442565b1185c16.std.52c7e1c1069d9b0a-cgu.0.rcgu.o␍
             Creating library C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps\std-6f442565b1185c16.dll.lib and object C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps\std-6f442565b1185c16.dll.exp␍
          C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-std\x86_64-pc-windows-msvc\release\deps\std-6f442565b1185c16.dll : fatal error LNK1169: one or more multiply defined symbols found␍

[RUSTC-TIMING] std test:false 12.550
error: could not compile `std` (lib) due to 1 previous error
Build completed unsuccessfully in 0:18:26

@bors
Copy link
Contributor

bors commented Feb 6, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.