Commit Graph

228616 Commits

Author SHA1 Message Date
Michael Goulet
bfc6ca8207 More tests 2023-06-27 21:36:15 +00:00
Michael Goulet
75a8f68183 Remove unnecessary DefineOpaqueTypes::Bubble from codegen 2023-06-27 21:36:15 +00:00
Michael Goulet
983f6b9787 Normalize opaques with escaping bound vars 2023-06-27 21:36:15 +00:00
bors
6b46c996e1 Auto merge of #113105 - matthiaskrgr:rollup-rci0uym, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #112207 (Add trustzone and virtualization target features for aarch32.)
 - #112454 (Make compiletest aware of targets without dynamic linking)
 - #112628 (Allow comparing `Box`es with different allocators)
 - #112692 (Provide more context for `rustc +nightly -Zunstable-options` on stable)
 - #112972 (Make `UnwindAction::Continue` explicit in MIR dump)
 - #113020 (Add tests impl via obj unless denied)
 - #113084 (Simplify some conditions)
 - #113103 (Normalize types when applying uninhabited predicate.)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-27 21:31:47 +00:00
Guillaume Gomez
acbfb8c3bd Replace id attribute with name for <meta> tag 2023-06-27 23:22:44 +02:00
bors
9e57657b79 Auto merge of #10968 - y21:manual_range_pat, r=Centri3
new lint: `manual_range_patterns`

Fixes #4931

changelog: new lint: [`manual_range_patterns`]
2023-06-27 21:07:13 +00:00
Alex Macleod
8647e29159 Use substring matching for TESTNAME 2023-06-27 20:36:05 +00:00
y21
b592d39968 manual_range_pattern -> manual_range_patterns 2023-06-27 22:35:54 +02:00
y21
1d4afc5d82 new lint: manual_range_pattern 2023-06-27 22:34:31 +02:00
y21
a43bfefd19 [unused_async]: don't lint on async trait impls 2023-06-27 22:30:38 +02:00
bors
6ce656f157 Auto merge of #11039 - Alexendoo:bless, r=llogiq
Add `BLESS` for compile-test and some cleanup

changelog: none

Allows passing the environment variable `BLESS` to bless tests, which is useful when you want to bless internal tests - `BLESS= cargo uitest -Finternal`

Also updates a place in the docs referring to `cargo dev bless` and removes some unused test deps
2023-06-27 20:25:06 +00:00
Matthias Krüger
4b1d0682a6
Rollup merge of #113103 - cjgillot:normalize-inhabited, r=compiler-errors
Normalize types when applying uninhabited predicate.

Fixes https://github.com/rust-lang/rust/issues/112997
2023-06-27 22:10:16 +02:00
Matthias Krüger
d505582ce2
Rollup merge of #113084 - WaffleLapkin:less_map_or, r=Nilstrieb
Simplify some conditions

r? `@Nilstrieb`

Some things taken out of my `is_none_or` pr.
2023-06-27 22:10:15 +02:00
Matthias Krüger
db11b77bdd
Rollup merge of #113020 - AnthonyKalaitzis:add-tests-impl-via-obj-unless-denied, r=compiler-errors
Add tests impl via obj unless denied

Fixes #112737

Add simple tests to check feature change in #112320 is performing as expected.

Note:

- Unsure about filenames, locations & function signature names (tried to make them something sensible)
2023-06-27 22:10:15 +02:00
Matthias Krüger
9ec676dd7f
Rollup merge of #112972 - nbdd0121:mir, r=davidtwco
Make `UnwindAction::Continue` explicit in MIR dump

Makes it easier to spot unwinding related issues in MIR by making `UnwindAction::Continue` explicit, just like all other `UnwindAction`s.
2023-06-27 22:10:14 +02:00
Matthias Krüger
b6144cd843
Rollup merge of #112692 - jieyouxu:better-err-msg-for-unstable-options, r=davidtwco
Provide more context for `rustc +nightly -Zunstable-options` on stable

<img width="724" alt="Screenshot 2023-06-16 123456" src="https://github.com/rust-lang/rust/assets/39484203/1933e172-cb9f-4e51-9540-ade803a88360">

Closes #110090.
2023-06-27 22:10:14 +02:00
Matthias Krüger
448d2a8417
Rollup merge of #112628 - gootorov:box_alloc_partialeq, r=joshtriplett
Allow comparing `Box`es with different allocators

Currently, comparing `Box`es over different allocators is not allowed:
```Rust
error[E0308]: mismatched types
  --> library/alloc/tests/boxed.rs:22:20
   |
22 |     assert_eq!(b1, b2);
   |                    ^^ expected `Box<{integer}, ConstAllocator>`, found `Box<{integer}, AnotherAllocator>`
   |
   = note: expected struct `Box<{integer}, ConstAllocator>`
              found struct `Box<{integer}, AnotherAllocator>`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `alloc` (test "collectionstests") due to previous error
```
This PR lifts this limitation
2023-06-27 22:10:13 +02:00
Matthias Krüger
353dd71d73
Rollup merge of #112454 - ferrocene:pa-compiletest-dynamic-linking, r=davidtwco
Make compiletest aware of targets without dynamic linking

Some parts of the compiletest internals and some tests require dynamic linking to work, which is not supported by all targets. Before this PR, this was handled by if branches matching on the target name.

This PR loads whether a target supports dynamic linking or not from the target spec, and adds a `// needs-dynamic-linking` attribute for tests that require it. Note that I was not able to replace all the old conditions based on the target name, as some targets have `dynamic_linking: true` in their spec but pretend they don't have it in compiletest.

Also, to get this to work I had to *partially* revert #111472 (cc `@djkoloski` `@tmandry` `@bjorn3).` On one hand, only the target spec contains whether a target supports dynamic linking, but on the other hand a subset of the fields can be overridden through `-C` flags (as far as I'm aware only `-C panic=$strategy`). The solution I came up with is to take the target spec as the base, and then override the panic strategy based on `--print=cfg`. Hopefully that should not break y'all again.
2023-06-27 22:10:13 +02:00
Matthias Krüger
1880e83ae3
Rollup merge of #112207 - qwandor:virt_feature, r=davidtwco
Add trustzone and virtualization target features for aarch32.

These are LLVM target features which allow the `smc` and `hvc` instructions respectively to be used in inline assembly.
2023-06-27 22:10:12 +02:00
bors
2e329050c9 Auto merge of #11041 - Alexendoo:nextest, r=Manishearth
Fix compile-test under cargo nextest

Fixes https://github.com/rust-lang/rust-clippy/issues/11036

changelog: none
2023-06-27 18:56:48 +00:00
Michael Goulet
de0e7d32fd pass PredicateFilter to compute_bounds 2023-06-27 18:28:27 +00:00
Michael Goulet
858a861fff Make associated type bounds in supertrait position implied 2023-06-27 18:28:07 +00:00
Alex Macleod
95ab05de25 Fix compile-test under cargo nextest 2023-06-27 18:25:35 +00:00
bors
c710b4815d Auto merge of #10884 - Centri3:needless_raw_string_hashes, r=dswij
New lint [`needless_raw_string_hashes`]

Emits a warning when there are an extraneous number of hashes(?) around a raw string literal, for example `r##"I'm a "raw string literal"!"##` or `cr#"crunb"#`

Closes #10882

I think this could also fit in `style` as well, rather than `complexity`.

changelog: Add [`needless_raw_string_hashes`] and [`needless_raw_string`] lints
2023-06-27 18:02:52 +00:00
bors
5ea6668646 Auto merge of #113102 - matthiaskrgr:rollup-wpkbsw1, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #112518 (Detect actual span for getting unexpected token from parsing macros)
 - #112978 (Add suggestion for bad block fragment error)
 - #113068 (bootstrap: rename 'user' profile to 'dist')
 - #113079 (Use `CoverageKind::as_operand_id` instead of manually reimplementing it)
 - #113089 (Export AnalysisResults trait in rustc_mir_dataflow)
 - #113093 (`thir`: Add `Become` expression kind)
 - #113096 (Remove unused struct and tweak format macro uses)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-27 17:54:24 +00:00
Camille GILLOT
6f3f878351 Normalize types when applying uninhabited predicate. 2023-06-27 17:10:14 +00:00
Camille GILLOT
0faea7728f Encode impls in encode_impls. 2023-06-27 16:50:34 +00:00
Camille GILLOT
845fcc1939 Use instrument macro. 2023-06-27 16:50:34 +00:00
Camille GILLOT
fd81e964b8 Retire encode_info_for_items. 2023-06-27 16:50:34 +00:00
Camille GILLOT
22df32264a Encode Impl separately. 2023-06-27 16:50:34 +00:00
Camille GILLOT
45a9a5460f Encode Trait info in def-id loop. 2023-06-27 16:50:34 +00:00
Camille GILLOT
1a9d34fd81 Merge assoc_item functions. 2023-06-27 16:50:34 +00:00
Camille GILLOT
3c790b3730 Encode fn_sig separately.
Closures do not have a `fn_sig`, so no reason to encode one.
2023-06-27 16:50:34 +00:00
Alex Macleod
76de5560fa Add BLESS for compile-test and some cleanup 2023-06-27 16:39:13 +00:00
Matthias Krüger
adc3ae24d6
Rollup merge of #113096 - TaKO8Ki:remove-unused-struct, r=oli-obk
Remove unused struct and tweak format macro uses

This pul request removes an unused struct and tweaks `format!` uses.
2023-06-27 17:48:47 +02:00
Matthias Krüger
4571be358b
Rollup merge of #113093 - WaffleLapkin:become_unuwuable_in_thir, r=Nilstrieb
`thir`: Add `Become` expression kind

This PR is pretty small and just adds `thir::ExprKind::Become`. I didn't include the checks that will be done on thir, since they are much more complicated and can be done in parallel with with MIR (or, well, at least I believe they can).

r? `@Nilstrieb`
2023-06-27 17:48:47 +02:00
Matthias Krüger
1dc29bbfd6
Rollup merge of #113089 - floriangru:mut_analyses_followup, r=oli-obk
Export AnalysisResults trait in rustc_mir_dataflow

Followup to https://github.com/rust-lang/rust/pull/108293
Re-exports the new trait defined in mentioned PR to make ResultsCursor::seek_before_primary_effect, ResultsCursor::seek_after_primary_effect... usable again outside the compiler itself.
2023-06-27 17:48:46 +02:00
Matthias Krüger
526326e10d
Rollup merge of #113079 - Zalathar:as-operand-id, r=oli-obk
Use `CoverageKind::as_operand_id` instead of manually reimplementing it

These two pieces of code are functionally equivalent to the `CoverageKind::as_operand_id` method that already exists, and is already used elsewhere in this file.

This slightly reduces the amount of code that manually pattern-matches on `CoverageKind`.
2023-06-27 17:48:46 +02:00
Matthias Krüger
1153aba3ec
Rollup merge of #113068 - clubby789:bootstrap-user-to-dist, r=jyn514
bootstrap: rename 'user' profile to 'dist'

Fixes #112074

Unfortunately a big chunk of the diff is adding `PartialEq/Eq/Debug` impls so we can `assert_eq` but I think better to have them in the long run.
For back compat, ensure `"maintainer"`, `"user"` and `"dist"` are all parsed as `Profile::Dist`.

r? `@jyn514`
cc `@AnakinSkywalkeer` who worked on the previous attempt at this
2023-06-27 17:48:45 +02:00
Matthias Krüger
e992895c1d
Rollup merge of #112978 - compiler-errors:bad-block-sugg, r=davidtwco
Add suggestion for bad block fragment error

Makes it a bit clearer how to fix this parser restriction
2023-06-27 17:48:45 +02:00
Matthias Krüger
9f2c21c11f
Rollup merge of #112518 - chenyukang:yukang-fix-112458, r=davidtwco
Detect actual span for getting unexpected token from parsing macros

Fixes #112458
2023-06-27 17:48:44 +02:00
许杰友 Jieyou Xu (Joe)
2ac2dc1cfa Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
许杰友 Jieyou Xu (Joe)
cef812bd95
Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
bors
3c554f5cb4 Auto merge of #112516 - erikdesjardins:loop, r=davidtwco
cg_llvm: use index-based loop in write_operand_repeatedly

This should be easier for LLVM to analyze.

Fixes #111603

This needs a perf run.

[cc](https://github.com/rust-lang/rust/issues/111603#issuecomment-1567531178) `@caojoshua`
2023-06-27 15:01:56 +00:00
Oli Scherer
b0142f603d
Avoid calling queries during query stack printing 2023-06-27 16:12:07 +02:00
Philipp Krones
5d3377dd67
Add regression test for OOM issue on EarlyLintPass ICE 2023-06-27 16:11:49 +02:00
Takayuki Maeda
8352c02fc2 avoid using format!("{}", ..) 2023-06-27 22:12:29 +09:00
bors
662388e17f Auto merge of #2943 - cbeuw:patch-1, r=oli-obk
Add missed trophy

https://github.com/vorner/arc-swap/issues/76 appears to have been missed
2023-06-27 13:11:58 +00:00
Takayuki Maeda
1b7efb5ade remove an unused struct ForbiddenNonLifetimeParam 2023-06-27 22:11:54 +09:00
Andy Wang
c91fb780a4
Add trophy
Appears to have been missed
2023-06-27 14:41:30 +02:00