Commit Graph

211946 Commits

Author SHA1 Message Date
bjorn3
26b6b2ff56 Update pretty_assertions to 1.3
This replaces ansi_term with yansi which in turn removes a winapi
dependency edge
2022-12-04 14:22:03 +01:00
bors
fd02567705 Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
Cheaper `dump_mir` take two

alternative to #105083

r? `@nnethercote`
2022-12-04 05:47:10 +00:00
bors
1195b672fb Auto merge of #104757 - camelid:consolidate-lints, r=GuillaumeGomez,jyn514,Manishearth
Consolidate rustdoc's lint passes into a single pass

This should improve performance and simplify the code.

r? `@GuillaumeGomez`
2022-12-04 02:56:45 +00:00
bors
2a39e45afb Auto merge of #105217 - jyn514:submodule-fixes, r=bjorn3
Don't exit with an error if there are no changes to submodules

Fixes https://github.com/rust-lang/rust/issues/105215, which regressed in https://github.com/rust-lang/rust/pull/104865.
2022-12-04 00:27:32 +00:00
bors
b8a52e3a4b Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #104199 (Keep track of the start of the argument block of a closure)
 - #105050 (Remove useless borrows and derefs)
 - #105153 (Create a hacky fail-fast mode that stops tests at the first failure)
 - #105164 (Restore `use` suggestion for `dyn` method call requiring `Sized`)
 - #105193 (Disable coverage instrumentation for naked functions)
 - #105200 (Remove useless filter in unused extern crate check.)
 - #105201 (Do not call fn_sig on non-functions.)
 - #105208 (Add AmbiguityError for inconsistent resolution for an import)
 - #105214 (update Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-03 21:25:45 +00:00
bors
2341517696 Auto merge of #105212 - pietroalbini:pa-macos-xl, r=jyn514
Switch to the `macos-12-xl` builder

This PR switches us to the `macos-12-xl` builders, a more powerful builder pool managed by GitHub for us.
2022-12-03 18:11:40 +00:00
Matthias Krüger
8be329de01
Rollup merge of #105214 - RalfJung:miri, r=RalfJung
update Miri

r? `@ghost`
2022-12-03 17:37:46 +01:00
Matthias Krüger
af8f72292b
Rollup merge of #105208 - chenyukang:yukang/fix-105069, r=cjgillot
Add AmbiguityError for inconsistent resolution for an import

Fixes #105069
Fixes #83950
2022-12-03 17:37:45 +01:00
Matthias Krüger
f91fa512d1
Rollup merge of #105201 - cjgillot:issue-105040, r=compiler-errors
Do not call fn_sig on non-functions.

Fixes https://github.com/rust-lang/rust/issues/105040
Fixes https://github.com/rust-lang/rust/issues/89271
2022-12-03 17:37:45 +01:00
Matthias Krüger
b1e680650e
Rollup merge of #105200 - cjgillot:issue-104562, r=compiler-errors
Remove useless filter in unused extern crate check.

Fixes https://github.com/rust-lang/rust/issues/104562
2022-12-03 17:37:44 +01:00
Matthias Krüger
ed9a21eb0c
Rollup merge of #105193 - tmiasko:naked-nocoverage, r=wesleywiser
Disable coverage instrumentation for naked functions

Fixes #105170.
2022-12-03 17:37:44 +01:00
Matthias Krüger
a739fc8153
Rollup merge of #105164 - compiler-errors:revert-import-filter, r=estebank
Restore `use` suggestion for `dyn` method call requiring `Sized`

Add the suggestion back that I accidentally removed in 88f2140d87 because I didn't understand that suggestion was actually useful...

Fixes #105159
2022-12-03 17:37:43 +01:00
Matthias Krüger
6f0a2adf6e
Rollup merge of #105153 - oli-obk:fail_faster, r=compiler-errors
Create a hacky fail-fast mode that stops tests at the first failure

This is useful for not having to wait until all 10k+ ui tests have finished running and then having to crawl through hundreds of failure reports.

You now only get the first report when you turn on that env var and no new tests are run at all

This works like a charm, but is obviously welded on very crudely
2022-12-03 17:37:42 +01:00
Matthias Krüger
1a2f79b82c
Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514
Remove useless borrows and derefs

They are nothing more than noise.
<sub>These are not all of them, but my clippy started crashing (stack overflow), so rip :(</sub>
2022-12-03 17:37:42 +01:00
Matthias Krüger
c89bff29e5
Rollup merge of #104199 - SarthakSingh31:issue-97417-1, r=cjgillot
Keep track of the start of the argument block of a closure

This removes a call to `tcx.sess.source_map()` from [compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs](https://github.com/rust-lang/rust/compare/master...SarthakSingh31:issue-97417-1?expand=1#diff-8406bbc0d0b43d84c91b1933305df896ecdba0d1f9269e6744f13d87a2ab268a) as required by #97417.

VsCode automatically applied `rustfmt` to the files I edited under `src/tools`. I can undo that if its a problem.

r? `@cjgillot`
2022-12-03 17:37:41 +01:00
Joshua Nelson
a0e56154f3 Don't exit with an error if there are no changes to submodules 2022-12-03 10:34:26 -06:00
Ralf Jung
229e65af51 update lockfile 2022-12-03 16:30:56 +01:00
bors
cab4fd678c Auto merge of #97485 - bjorn3:new_archive_writer, r=wesleywiser
Rewrite LLVM's archive writer in Rust

This allows it to be used by other codegen backends.

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155
2022-12-03 15:07:39 +00:00
Pietro Albini
fcbae989ae
switch to the macos-12-xl builder 2022-12-03 15:46:18 +01:00
yukang
795b2afd20 fix #105069, Add AmbiguityError for inconsistent resolution for an import 2022-12-03 22:28:35 +08:00
bjorn3
a99838a115 Make sure all input archives are unmapped before persisting the output archive 2022-12-03 12:53:47 +00:00
bors
840f227b00 Auto merge of #2712 - RalfJung:rustup, r=RalfJung
Rustup
2022-12-03 12:32:28 +00:00
Ralf Jung
29814f2e2a clippy 2022-12-03 13:31:57 +01:00
bors
4bb15759d7 Auto merge of #105183 - GuillaumeGomez:merge-and-dedup-predicates, r=notriddle
Merge generics and where predicates and prevent duplicates in where predicates

Part of #104886 (I didn't include bounds from parent trait yet as I think the PR is already big enough).

Also we'll need to run a perf check.

cc `@fmease` since you worked a bit on this.
r? `@notriddle`
2022-12-03 11:28:33 +00:00
Camille GILLOT
e973240d18 Do not call fn_sig on non-functions. 2022-12-03 09:34:06 +00:00
Camille GILLOT
59cc6cd4ac Remove useless filter in unused extern crate check. 2022-12-03 09:23:03 +00:00
bors
703d95e183 Auto merge of #105133 - oli-obk:promoted_def_ids, r=cjgillot
Ensure query backtraces work for `DefId`s created after ast lowering

r? `@cjgillot`
2022-12-03 08:17:46 +00:00
bors
24f2704e96 Auto merge of #105196 - JohnTitor:rollup-8rxqnq6, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #104903 (Use ocx.normalize in report_projection_error)
 - #105032 (improve doc of into_boxed_slice and impl From<Vec<T>> for Box<[T]>)
 - #105100 (Add missing intra-doc link)
 - #105181 (Don't add a note for implementing a trait if its inner type is erroneous)
 - #105182 (Rustdoc-Json: Don't inline foreign traits)
 - #105188 (Don't elide type information when printing E0308 with `-Zverbose`)
 - #105189 (rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-03 05:24:35 +00:00
Yuki Okushi
d8f6cc3b63
Rollup merge of #105189 - notriddle:notriddle/rustdoc-toggle-hideme, r=GuillaumeGomez
rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`
2022-12-03 12:51:30 +09:00
Yuki Okushi
7d4af8852c
Rollup merge of #105188 - compiler-errors:verbose-ty-err, r=TaKO8Ki
Don't elide type information when printing E0308 with `-Zverbose`

When we pass `-Zverbose`, we kinda expect for all `_` to be replaced with more descriptive information, for example --

```
   = note: expected fn pointer `fn(_, u32)`
                 found fn item `fn(_, i32) {foo}`
```

Where `_` is the "identical" part of the fn signatures, now gets rendered as:

```
   = note: expected fn pointer `fn(i32, u32)`
                 found fn item `fn(i32, i32) {foo}`
```
2022-12-03 12:51:30 +09:00
Yuki Okushi
9afa850d39
Rollup merge of #105182 - aDotInTheVoid:rdj-no-foreign-traits, r=Enselic,GuillaumeGomez
Rustdoc-Json: Don't inline foreign traits

It wasn't done correctly, and [we want to move towards only having local items in the index, and making foreign items easier to resolved](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Include.20All.20Foreign.20Items.3F)

Fixes #105025. This means #105015 is included to test this

Fixes #105022

r? `@GuillaumeGomez`
2022-12-03 12:51:29 +09:00
Yuki Okushi
8f368666b5
Rollup merge of #105181 - bhbs:skip-note, r=estebank
Don't add a note for implementing a trait if its inner type is erroneous

Fix #105138
2022-12-03 12:51:29 +09:00
Yuki Okushi
019795b162
Rollup merge of #105100 - jhpratt:fix-docs, r=JohnTitor
Add missing intra-doc link

Trivial change. This makes the plain text into inline code and makes it a link.

`@rustbot` label +A-docs
2022-12-03 12:51:28 +09:00
Yuki Okushi
9f3ccd4bf6
Rollup merge of #105032 - HintringerFabian:improve_docs, r=JohnTitor
improve doc of into_boxed_slice and impl From<Vec<T>> for Box<[T]>

Improves description of `into_boxed_slice`, and adds example to `impl From<Vec<T>> for Box<[T]>`.
Fixes #98908
2022-12-03 12:51:27 +09:00
Yuki Okushi
52e886279a
Rollup merge of #104903 - spastorino:consolidate-normalize-in-report_projection_error, r=lcnr
Use ocx.normalize in report_projection_error

r? `@lcnr`

cc `@compiler-errors`
2022-12-03 12:51:27 +09:00
bors
dd7a12593a Auto merge of #105073 - weihanglo:update-cargo, r=weihanglo
Update cargo

9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306
2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000
- Refactor generate_targets into separate module (https://github.com/rust-lang/cargo/pull/11445)
- Improve file found in multiple build targets warning (https://github.com/rust-lang/cargo/pull/11299)
- Error when precise without -p flag (https://github.com/rust-lang/cargo/pull/11349)
- Improve strategy for selecting targets to be scraped for examples (https://github.com/rust-lang/cargo/pull/11430)
- Aware of compression ratio for unpack size limit (https://github.com/rust-lang/cargo/pull/11337)
- Add test for rustdoc-map generation when using sparse registries (https://github.com/rust-lang/cargo/pull/11403)
- Add error message when `cargo fix` on an empty repo (https://github.com/rust-lang/cargo/pull/11400)
- Store the sparse+ prefix in the SourceId for sparse registries (https://github.com/rust-lang/cargo/pull/11387)
- Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (https://github.com/rust-lang/cargo/pull/11425)
2022-12-03 02:12:48 +00:00
Weihang Lo
9bd6062833
Update cargo
9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306
2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000
- Refactor generate_targets into separate module (rust-lang/cargo#11445)
- Improve file found in multiple build targets warning (rust-lang/cargo#11299)
- Error when precise without -p flag (rust-lang/cargo#11349)
- Improve strategy for selecting targets to be scraped for examples (rust-lang/cargo#11430)
- Aware of compression ratio for unpack size limit (rust-lang/cargo#11337)
- Add test for rustdoc-map generation when using sparse registries (rust-lang/cargo#11403)
- Add error message when `cargo fix` on an empty repo (rust-lang/cargo#11400)
- Store the sparse+ prefix in the SourceId for sparse registries (rust-lang/cargo#11387)
- Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (rust-lang/cargo#11425)
2022-12-03 01:11:11 +00:00
bhbs
715d4a8949 Don't add a note for implementing a trait if its inner type is erroneous 2022-12-03 09:06:47 +09:00
Tomasz Miąsko
b740cdcf43 Mark naked functions as never inline in codegen_fn_attrs
Use code generation attributes to ensure that naked functions are never
inline, replacing separate checks in MIR inliner and LLVM code
generation.
2022-12-03 01:04:42 +01:00
Tomasz Miąsko
c955add18c Disable coverage instrumentation for naked functions 2022-12-03 01:03:28 +01:00
bors
e526d123aa Auto merge of #105187 - matthiaskrgr:rollup-nxyxpko, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #105026 (v8a as default aarch64 target)
 - #105033 (sparc-struct-abi: work around new tail-call optimization)
 - #105144 (Document normalization methods `At::{normalize,query_normalize}`)
 - #105155 (rustdoc: clean up help and settings button CSS)
 - #105162 (Properly synthesize `FnSig` value during cycle)
 - #105163 (Check lifetime param count in `collect_trait_impl_trait_tys`)
 - #105185 (Move `normalize_fn_sig` to `TypeErrCtxt`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-02 23:00:48 +00:00
Michael Howell
c635cb774b rustdoc: clean up redundant CSS on .rustdoc-toggle.hideme 2022-12-02 14:39:06 -07:00
Michael Goulet
5c642d7d1c Don't elide information when printing E0308 with Zverbose 2022-12-02 21:01:59 +00:00
Santiago Pastorino
89047430f1
Define values and err as non mutable 2022-12-02 17:31:45 -03:00
Santiago Pastorino
4dacf4f469
Use ocx.normalize in report_projection_error 2022-12-02 17:31:40 -03:00
Matthias Krüger
8e0d83a70c
Rollup merge of #105185 - compiler-errors:normalize_fn_sig-in-err-ctxt, r=lcnr
Move `normalize_fn_sig` to `TypeErrCtxt`

r? `@lcnr`
2022-12-02 21:22:50 +01:00
Matthias Krüger
09e2d0f289
Rollup merge of #105163 - compiler-errors:afit-lt-arity, r=jackh726
Check lifetime param count in `collect_trait_impl_trait_tys`

We checked the type and const generics count, but not the lifetimes, which were handled in a different function.

Fixes #105154
2022-12-02 21:22:50 +01:00
Matthias Krüger
babdf86952
Rollup merge of #105162 - compiler-errors:fn-sig-arity, r=cjgillot
Properly synthesize `FnSig` value during cycle

Get the arity correct when creating a `FnSig` type during `tcx.fn_sig` cycle recovery

Fixes #105152
2022-12-02 21:22:49 +01:00
Matthias Krüger
de0d18a85e
Rollup merge of #105155 - notriddle:notriddle/flexbox-help-settings-buttons, r=GuillaumeGomez
rustdoc: clean up help and settings button CSS

The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically.

Preview: http://notriddle.com/notriddle-rustdoc-demos/flexbox-help-settings-buttons/test_dingus/
2022-12-02 21:22:49 +01:00
Matthias Krüger
b5b2d03c0c
Rollup merge of #105144 - compiler-errors:normalization-doc, r=lcnr
Document normalization methods `At::{normalize,query_normalize}`

r? ``@lcnr``
2022-12-02 21:22:48 +01:00