Commit Graph

251240 Commits

Author SHA1 Message Date
bors ba527200cc Auto merge of #123171 - matthiaskrgr:rollup-7id2r8o, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #123063 (Function ABI is irrelevant for reachability)
 - #123096 (Don't check match scrutinee of postfix match for unused parens)
 - #123146 (Use compiletest directives instead of manually checking TARGET / tools)
 - #123160 (remove `def_id_to_node_id` in ast lowering)
 - #123162 (Correctly get complete intra-doc link data)
 - #123164 (Bump Unicode printables to version 15.1, align to unicode_data)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-28 18:27:54 +00:00
Urgau fefb8f1f9c Replace Session should_remap_filepaths with filename_display_preference 2024-03-28 18:47:26 +01:00
Urgau 4f4fa42b0e Introduce `FileNameMapping::to_real_filename` and use it everywhere 2024-03-28 18:47:26 +01:00
Urgau ee2898d3f1 Make local_crate_source_file return a RealFileName
so it can be remapped (or not) by callers
2024-03-28 18:47:26 +01:00
Urgau 106146fd95 Replace `RemapFileNameExt::for_codegen` with explicit calls 2024-03-28 18:47:26 +01:00
Urgau 777c6b46cc Simplify trim-paths feature by merging all debuginfo options together 2024-03-28 18:47:26 +01:00
bors ab10eea62e Auto merge of #16967 - dfireBird:fix-16963, r=lnicola
fix: ADT hover considering only type or const len not lifetimes

I feel like test doesn't do much. Please suggest if I should improve it?

Fixes #16963
2024-03-28 16:45:45 +00:00
Matthias Krüger 83b4d3d638
Rollup merge of #123164 - Marcondiro:unicode15-1, r=Manishearth
Bump Unicode printables to version 15.1, align to unicode_data

r? `@Manishearth`
Thanks!
2024-03-28 17:40:51 +01:00
Matthias Krüger cba164c518
Rollup merge of #123162 - GuillaumeGomez:fix-123158, r=notriddle
Correctly get complete intra-doc link data

Fixes https://github.com/rust-lang/rust/issues/123158.

The problem was that we didn't take into account cases where there would be content other than backticks into the intra doc link definition.

r? `@notriddle`
2024-03-28 17:40:51 +01:00
Matthias Krüger 1ec73f0c4c
Rollup merge of #123160 - bvanjoi:cleanup, r=compiler-errors
remove `def_id_to_node_id` in ast lowering
2024-03-28 17:40:50 +01:00
Matthias Krüger d1630e535f
Rollup merge of #123146 - jieyouxu:use-compiletest-directives, r=clubby789
Use compiletest directives instead of manually checking TARGET / tools

Changes:

- Accept `ignore-wasm32-wasip1` and `needs-wasmtime` directives.
- Add support for needing `wasmtime` as a runner.
- Update wasm/compiler_builtin tests to use compiletest directives over manual checks.
2024-03-28 17:40:50 +01:00
Matthias Krüger 69cfe80834
Rollup merge of #123096 - compiler-errors:postfix-match-parens, r=fmease
Don't check match scrutinee of postfix match for unused parens

We only check the scrutinees of block-like constructs and a few others (return/index/assign/method calls). Just don't do it for postfix match at all.

Fixes #123064

r? fmease
2024-03-28 17:40:49 +01:00
Matthias Krüger 732ded92a0
Rollup merge of #123063 - tmiasko:reachability-abi, r=michaelwoerister
Function ABI is irrelevant for reachability
2024-03-28 17:40:49 +01:00
Michael Goulet 6439c7fe23 Require foldability part of interner item bounds, remove redundant where clauses 2024-03-28 12:30:52 -04:00
Michael Goulet 08c7ff2264 Restrict const ty's regions to static when putting them in canonical var list 2024-03-28 12:30:52 -04:00
dfireBird 34a8cd6a7a
fix ADT hover considering only type or const len not lifetimes 2024-03-28 21:53:22 +05:30
bors 929bceeaf8 Auto merge of #123167 - DianQK:test-simd-wide-sum, r=scottmcm
Restore the test checks for `wider_reduce_into_iter`

The current minimum support is for LLVM 17. Context: https://github.com/rust-lang/rust/pull/116018#discussion_r1348353459.

r? scottmcm
2024-03-28 16:23:04 +00:00
klensy 8245718503 and more
warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_mir_transform\src\coroutine.rs:1229:11
     |
1229 |     body: &mut Body<'tcx>,
     |           ^^^^^^^^^^^^^^^ help: consider changing to: `&Body<'tcx>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_mir_transform\src\nrvo.rs:123:11
    |
123 |     body: &mut mir::Body<'_>,
    |           ^^^^^^^^^^^^^^^^^^ help: consider changing to: `&mir::Body<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_mir_transform\src\nrvo.rs:87:34
   |
87 | fn local_eligible_for_nrvo(body: &mut mir::Body<'_>) -> Option<Local> {
   |                                  ^^^^^^^^^^^^^^^^^^ help: consider changing to: `&mir::Body<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 17:19:15 +03:00
bors c5e7f45b62 Auto merge of #115220 - Zoxc:revive-gcx-ptr, r=oli-obk
Add a `CurrentGcx` type to let the deadlock handler access `TyCtxt`

This brings back `GCX_PTR` (previously removed in https://github.com/rust-lang/rust/pull/74969) allowing the deadlock handler access to `GlobalCtxt`. This fixes https://github.com/rust-lang/rust/issues/111522.

r? `@cjgillot`
2024-03-28 14:00:08 +00:00
klensy 9a6b3dfc06 and few more
maybe bug here?

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_borrowck\src\diagnostics\conflict_errors.rs:3857:35
     |
3857 |     pub(crate) fn emit(&self, cx: &mut MirBorrowckCtxt<'_, 'tcx>, diag: &mut Diag<'_>) -> String {
     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&MirBorrowckCtxt<'_, 'tcx>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_borrowck\src\type_check\liveness\trace.rs:601:17
    |
601 |         typeck: &mut TypeChecker<'_, 'tcx>,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&TypeChecker<'_, 'tcx>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 16:57:32 +03:00
DianQK ec359f7d9f
Restore the test checks for `wider_reduce_into_iter`
The current minimum support is for LLVM 17.
2024-03-28 21:28:45 +08:00
klensy 5488e492af and few more
warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_codegen_ssa\src\back\rpath.rs:80:41
   |
80 | fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path) -> OsString {
   |                                         ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&RPathConfig<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_codegen_ssa\src\back\rpath.rs:76:42
   |
76 | fn get_rpaths_relative_to_output(config: &mut RPathConfig<'_>) -> Vec<OsString> {
   |                                          ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&RPathConfig<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_codegen_ssa\src\back\rpath.rs:55:23
   |
55 | fn get_rpaths(config: &mut RPathConfig<'_>) -> Vec<OsString> {
   |                       ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&RPathConfig<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_codegen_ssa\src\back\rpath.rs:15:32
   |
15 | pub fn get_rpath_flags(config: &mut RPathConfig<'_>) -> Vec<OsString> {
   |                                ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&RPathConfig<'_>`
   |
   = warning: changing this function will impact semver compatibility
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 16:26:37 +03:00
bors 4ea92e3c7a Auto merge of #123166 - bjorn3:sync_cg_clif-2024-03-28, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlight this time is debuginfo for statics. Not all types are supported yet. Those that aren't supported are represented as `[u8; mem::size_of::<T>()]` instead.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2024-03-28 11:57:39 +00:00
bjorn3 987ed345af Merge commit '09fae60a86b848a2fc0ad219ecc4e438dc1eef86' into sync_cg_clif-2024-03-28 2024-03-28 11:43:35 +00:00
bjorn3 09fae60a86 Fix rustc test suite 2024-03-28 11:38:15 +00:00
bjorn3 ef0b3d1def Rustup to rustc 1.79.0-nightly (c9f8f3438 2024-03-27) 2024-03-28 11:17:20 +00:00
Marcondiro e9870b5df3
Bump Unicode printables to version 15.1, align to unicode_data 2024-03-28 11:21:52 +01:00
klensy c64a440312 fix few more
warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_trait_selection\src\traits\project.rs:511:12
    |
511 |     selcx: &mut SelectionContext<'a, 'tcx>,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&SelectionContext<'a, 'tcx>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_trait_selection\src\traits\specialize\specialization_graph.rs:201:28
    |
201 | fn iter_children(children: &mut Children) -> impl Iterator<Item = DefId> + '_ {
    |                            ^^^^^^^^^^^^^ help: consider changing to: `&Children`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 13:16:22 +03:00
Guillaume Gomez f1cfbdbb99 Add regression test for #123158 2024-03-28 11:09:08 +01:00
Guillaume Gomez 75fedfc4ea Correctly get complete intra-doc link data 2024-03-28 11:08:50 +01:00
bors 551abd65be Auto merge of #116891 - aliemjay:opaque-region-infer-rework-2, r=compiler-errors,oli-obk
rework opaque type region inference

User-facing changes are documented in [this comment](https://github.com/rust-lang/rust/pull/116891#issuecomment-1973774412).

The design document is in [this comment](https://github.com/rust-lang/rust/pull/116891#issuecomment-1836900102).

---

\- Fix Ice in check_unique; ICE -> Error; fixes #122782.
\- Ignore uncaptured lifetime args; ICE -> Pass; fixes #111906, fixes #110623, fixes #109059, fixes #122307
\- Except equal parameters from the uniqueness check; Pass -> Error; fixes #113916.
\- Check RPITs for invalid args; Pass -> Error; fixes #111935; ICE -> Error; fixes #110726.
\- Rework opaque types region inference; Pass -> Error; fixes #113971, fixes #112841.
\- Reject external lifetimes as invalid args; Pass -> Error; fixes #105498.

r? `@ghost`
2024-03-28 09:51:39 +00:00
klensy afd0a8eb8f change BuiltinDeriveFn type to get ExtCtxt by immutable ref and fix signatures 2024-03-28 12:49:18 +03:00
klensy 615bb53a8d compiler: fix few needless_pass_by_ref_mut clippy lints
warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\clone.rs:160:9
    |
160 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\cmp\partial_ord.rs:72:9
   |
72 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\cmp\partial_eq.rs:19:18
   |
19 |     fn cs_eq(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>) -> BlockOrExpr {
   |                  ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\cmp\ord.rs:42:19
   |
42 | pub fn cs_cmp(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>) -> BlockOrExpr {
   |                   ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:917:13
    |
917 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1406:13
     |
1406 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1157:13
     |
1157 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1103:13
     |
1103 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1080:13
     |
1080 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:859:13
    |
859 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:805:13
    |
805 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:467:13
    |
467 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:457:13
    |
457 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 12:36:45 +03:00
klensy ecb39926d8 compiler: fix few needless_pass_by_ref_mut clippy lints
warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\mod.rs:120:9
    |
120 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1573:13
     |
1573 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1556:13
     |
1556 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1463:13
     |
1463 |         cx: &mut ExtCtxt<'_>,
     |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:1433:36
     |
1433 |     fn summarise_struct(&self, cx: &mut ExtCtxt<'_>, struct_def: &VariantData) -> StaticFields {
     |                                    ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:953:13
    |
953 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:932:13
    |
932 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:580:13
    |
580 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\generic\mod.rs:989:13
    |
989 |         cx: &mut ExtCtxt<'_>,
    |             ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\clone.rs:97:9
   |
97 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\cmp\eq.rs:52:9
   |
52 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\hash.rs:50:9
   |
50 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\encodable.rs:150:9
    |
150 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\default.rs:176:9
    |
176 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\default.rs:106:9
    |
106 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\default.rs:57:9
   |
57 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\default.rs:84:9
   |
84 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\deriving\debug.rs:212:9
    |
212 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\deriving\debug.rs:48:26
   |
48 | fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>) -> BlockOrExpr {
   |                          ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 12:16:08 +03:00
klensy 316bc1c67c compiler: fix few needless_pass_by_ref_mut clippy lints
warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\asm.rs:306:28
    |
306 | fn err_duplicate_option(p: &mut Parser<'_>, symbol: Symbol, span: Span) {
    |                            ^^^^^^^^^^^^^^^ help: consider changing to: `&Parser<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\asm.rs:318:8
    |
318 |     p: &mut Parser<'a>,
    |        ^^^^^^^^^^^^^^^ help: consider changing to: `&Parser<'a>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\assert.rs:114:25
    |
114 | fn parse_assert<'a>(cx: &mut ExtCtxt<'a>, sp: Span, stream: TokenStream) -> PResult<'a, Assert> {
    |                         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'a>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\asm.rs:32:10
   |
32 |     ecx: &mut ExtCtxt<'a>,
   |          ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'a>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\test.rs:99:9
   |
99 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\source_util.rs:237:9
    |
237 |     cx: &mut ExtCtxt<'_>,
    |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\format.rs:809:10
    |
809 |     ecx: &mut ExtCtxt<'_>,
    |          ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\format.rs:737:10
    |
737 |     ecx: &mut ExtCtxt<'a>,
    |          ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'a>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\format.rs:68:24
   |
68 | fn parse_args<'a>(ecx: &mut ExtCtxt<'a>, sp: Span, tts: TokenStream) -> PResult<'a, MacroInput> {
   |                        ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'a>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_builtin_macros\src\format.rs:607:10
    |
607 |     ecx: &mut ExtCtxt<'_>,
    |          ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\edition_panic.rs:43:9
   |
43 |     cx: &'cx mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\concat_bytes.rs:11:9
   |
11 |     cx: &mut ExtCtxt<'_>,
   |         ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\cfg.rs:38:22
   |
38 | fn parse_cfg<'a>(cx: &mut ExtCtxt<'a>, span: Span, tts: TokenStream) -> PResult<'a, ast::MetaItem> {
   |                      ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'a>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_builtin_macros\src\cfg_accessible.rs:13:28
   |
13 | fn validate_input<'a>(ecx: &mut ExtCtxt<'_>, mi: &'a ast::MetaItem) -> Option<&'a ast::Path> {
   |                            ^^^^^^^^^^^^^^^^ help: consider changing to: `&ExtCtxt<'_>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 12:04:00 +03:00
bohan 90306cd841 remove `def_id_to_node_id` in ast lowering 2024-03-28 16:58:03 +08:00
bors 899db83128 Auto merge of #16957 - poliorcetics:ab/push-tlzsqmqqurxs, r=lnicola
fix: check for client support of relative glob patterns before using them

Fixes #16955
2024-03-28 08:57:29 +00:00
klensy aa35530319 compiler: fix few needless_pass_by_ref_mut clippy lints
warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_session\src\config.rs:2013:16
     |
2013 |     early_dcx: &mut EarlyDiagCtxt,
     |                ^^^^^^^^^^^^^^^^^^ help: consider changing to: `&EarlyDiagCtxt`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_ast_passes\src\ast_validation.rs:1555:11
     |
1555 |     this: &mut AstValidator<'_>,
     |           ^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&AstValidator<'_>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
  --> compiler\rustc_infer\src\infer\snapshot\fudge.rs:16:12
   |
16 |     table: &mut UnificationTable<'_, 'tcx, T>,
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&UnificationTable<'_, 'tcx, T>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

warning: this argument is a mutable reference, but not used mutably
   --> compiler\rustc_expand\src\expand.rs:961:13
    |
961 |     parser: &mut Parser<'a>,
    |             ^^^^^^^^^^^^^^^ help: consider changing to: `&Parser<'a>`
    |
    = warning: changing this function will impact semver compatibility
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 11:37:52 +03:00
klensy b6cfe71f38 compiler: fix some clippy needless_pass_by_ref_mut
warning: this argument is a mutable reference, but not used mutably
    --> compiler\rustc_session\src\config.rs:2111:20
     |
2111 |     unstable_opts: &mut UnstableOptions,
     |                    ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&UnstableOptions`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
2024-03-28 11:04:39 +03:00
klensy bf47641726 compiler: fix unused_peekable clippy lint
warning: `peek` never called on `Peekable` iterator
   --> compiler\rustc_session\src\utils.rs:130:13
    |
130 |     let mut args = std::env::args_os().map(|arg| arg.to_string_lossy().to_string()).peekable();
    |             ^^^^
    |
    = help: consider removing the call to `peekable`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_peekable

warning: `peek` never called on `Peekable` iterator
    --> compiler\rustc_trait_selection\src\traits\error_reporting\suggestions.rs:4934:17
     |
4934 |         let mut bounds = pred.bounds.iter().peekable();
     |                 ^^^^^^
     |
     = help: consider removing the call to `peekable`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_peekable
2024-03-28 10:50:09 +03:00
bors d0e8cbbd99 Auto merge of #122898 - jieyouxu:tidy-no-new-makefiles, r=albertlarsan68
Add tidy check to error on new `Makefile`s in `tests/run-make`

We would like to strongly encourage new `run-make` tests to be written in Rust and not add any new `Makefile`-based `run-make` tests.
2024-03-28 07:38:55 +00:00
bors 29a8e65bbe Auto merge of #16965 - roife:use-lldb-for-cpp-ext, r=lnicola
fix: use lldb when debugging with C++ extension on MacOS

See https://github.com/rust-lang/rust-analyzer/issues/16901#issuecomment-2024486941

This PR resolves the issue of being unable to debug using the C++ extension on macOS. By using special configurations for the `MIMode` on macOS, it enables the C++ extension to connect to lldb when debugging (without affecting other platforms).
2024-03-28 06:49:49 +00:00
Ali MJ Al-Nasrawy 59c217fed2 remove test FIXME re once-module-region 2024-03-28 06:41:22 +00:00
roife 3521089985 fix: use lldb when debugging with C++ extension 2024-03-28 14:38:23 +08:00
bors 4bf521df35 Auto merge of #16964 - lnicola:debugger-order, r=roife
fix: Revert debug extension priorities

Close #16901
2024-03-28 06:08:47 +00:00
Ali MJ Al-Nasrawy fb35156bb5 fixup except equal params from 2024-03-28 06:08:43 +00:00
Ali MJ Al-Nasrawy 7c6876f9a9 simplify check_unique 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy 6b6ed2ea28 reject external lifetimes as invalid arguments 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy f4940e4d22 rework opaque types region inference 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy 08c8caa524 convert all named regions in opaque types to nll vars
Do it in typeck before entering region inference routines
particularly because we will no longer be able to convert placeholders.
2024-03-28 06:00:26 +00:00