Commit Graph

195889 Commits

Author SHA1 Message Date
Michael Goulet
2bbcdc7333 Handle additional lifetime bounds on GATs like on methods 2022-07-24 18:57:41 +00:00
bors
7fe022f5aa Auto merge of #99687 - RalfJung:rollup-bojacrc, r=RalfJung
Rollup of 4 pull requests

Successful merges:

 - #99644 (remove some provenance-related machine hooks that Miri no longer needs)
 - #99657 (Docs - remove unnecessary `mut` that gives a warning)
 - #99672 (Remove Clean trait implementation for more items)
 - #99678 (Update doc comments that refer to config parameter)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-07-24 18:55:31 +00:00
Ralf Jung
d10a7b1243 add miri-track-caller to some intrinsic-exposing methods 2022-07-24 14:49:33 -04:00
Michael Goulet
6bb7581a59 Slightly improve mismatched GAT where clause error 2022-07-24 18:39:59 +00:00
Ralf Jung
34d0c0abf6
Rollup merge of #99678 - danbev:rustc_parse-config-doc-comments, r=cjgillot
Update doc comments that refer to config parameter

This commit updates the `source_file_to_parser` and the
`maybe_source_file_to_parse` function's doc comments which currently
refer to a `config` parameter. The doc comments have been updated to
refer to the `session` parameter similar to the doc comment for
`try_file_to_source_file`, which also takes a `&Session` parameter.
2022-07-24 14:04:29 -04:00
Ralf Jung
06009c28f4
Rollup merge of #99672 - GuillaumeGomez:clean-trait-removal, r=Dylan-DPC
Remove Clean trait implementation for more items

Follow up of #99638.

cc `@camelid`
r? `@notriddle`
2022-07-24 14:04:28 -04:00
Ralf Jung
51b3d51cf4
Rollup merge of #99657 - Phosra:patch-1, r=Dylan-DPC
Docs - remove unnecessary `mut` that gives a warning

Fixes #99654.

A trivial linting fix for a Stdio example.

`@rustbot` label +T-lib
2022-07-24 14:04:27 -04:00
Ralf Jung
890cd7a496
Rollup merge of #99644 - RalfJung:interpret-int-ptr-transmute, r=oli-obk
remove some provenance-related machine hooks that Miri no longer needs

Then we can make `scalar_to_ptr` a method on `Scalar`. :)

Fixes https://github.com/rust-lang/miri/issues/2188
r? `@oli-obk`
2022-07-24 14:04:26 -04:00
bors
2a990f7c0f Auto merge of #99409 - tmiasko:atomic-tests, r=m-ou-se
Test codegen of atomic compare-exchange with additional memory orderings

* Add a test for atomic operations introduced in #97423 & #98383.
* Add a test for fallback code generation strategy used on LLVM 12 introduced in #98385. Use a separate test case instead of a revision system since test will be gone once LLVM 12 is no longer supported.
2022-07-24 16:26:56 +00:00
Jubilee Young
dda53383d9 Revert "Revert "Use ICF (identical code folding) for building rustc""
This reverts commit rust-lang/rust@45575d23f3,
thereby enabling identical code folding again.
2022-07-24 08:52:08 -07:00
Amos Wenger
ee584c19c7 Make macros test order-resistant 2022-07-24 16:48:06 +02:00
Daniel Bevenius
045140a25b Update doc comments that refer to config parameter
This commit updates the source_file_to_parser and the
maybe_source_file_to_parse function's doc comments which currently
refer to a config parameter. The doc comments have been updated to
refer to the 'session' parameter similar to the doc comment for
try_file_to_source_file, which also takes a &Session parameter.
2022-07-24 16:40:24 +02:00
Pietro Albini
f1063c054d
remove new allocations from imported_source_files 2022-07-24 16:20:14 +02:00
Amos Wenger
6c07c71821 Sort when iterating through CrateGraph 2022-07-24 16:11:05 +02:00
Amos Wenger
4e1a302efc Sort in DefMap::dump, since HashMap iteration order isn't defined 2022-07-24 16:04:20 +02:00
Amos Wenger
e436260d7a hir-def tests: sort results before comparing, since FxHashSet iteration order isn't guaranteed
(And, in fact, it failed on i686)
2022-07-24 15:55:26 +02:00
bors
c32dcbba18 Auto merge of #99670 - Amanieu:revert-99595, r=nikic
Revert "Mark atomics as unsupported on thumbv6m"

This is a breaking change for the `thumbv6m` target. See #99668 for discussion on how we can proceed forward from here.

This reverts commit 7514610219.

cc `@nikic`
2022-07-24 13:46:15 +00:00
Thom Chiovoloni
6cfd471ffe
Don't overwrite CodegenFnAttrs when adding used compiler/linker 2022-07-24 06:37:50 -07:00
Ralf Jung
f80bf1013d don't ICE on invalid dyn calls 2022-07-24 09:21:05 -04:00
Guillaume Gomez
e55b0206f3 Remove Clean trait implementation for Constant 2022-07-24 15:08:24 +02:00
Guillaume Gomez
8098f5faa8 Remove Clean trait implementation for FieldDef 2022-07-24 14:58:10 +02:00
Maybe Waffle
7f1af42190 Satisfy theme check 2022-07-24 16:48:35 +04:00
Amanieu d'Antras
d931a587e6 Revert "Mark atomics as unsupported on thumbv6m"
This reverts commit 7514610219.
2022-07-24 13:12:08 +01:00
Amos Wenger
1bb63df1fd Fix .gitattributes for test_data 2022-07-24 14:05:35 +02:00
Deadbeef
65fca6db19 add const hack comment 2022-07-24 12:01:23 +00:00
Deadbeef
a89510e5f9 Add issue numbers 2022-07-24 12:01:22 +00:00
Deadbeef
9fc5463c18 Constify a few const (Partial)Ord impls 2022-07-24 12:01:22 +00:00
Maybe Waffle
d566334a94 add backticks 2022-07-24 15:10:39 +04:00
Maybe Waffle
9b9693c11b Add rustdoc test for #[rustc_must_implement_one_of] 2022-07-24 15:10:39 +04:00
Maybe Waffle
3da2553f2f Add support for #[rustc_must_implement_one_of] to rustdoc 2022-07-24 15:10:04 +04:00
ouz-a
9f00d836af make sure has_deref is correct 2022-07-24 13:26:20 +03:00
bors
b4151a41a0 Auto merge of #93429 - fee1-dead-contrib:allow-super-trait-tilde-const, r=oli-obk
Allow `trait A: ~const B`

What's included: a minimal working change set for `~const` supertraits to work.

r? `@oli-obk`
2022-07-24 09:16:02 +00:00
Joshua Nelson
ee09dc5510 Small fixups
- use `path` instead of `paths`
- don't mark rust-analyzer as an optional tool
- print the cargo command that's run in the proc-macro-test build script

  this originally was part of a change to fix `test --stage 0 rust-analyzer`,
  but I'm going to leave that for a separate PR so it's easier to review.
2022-07-24 10:38:42 +02:00
Amos Wenger
e0add21c2b Move cfg attrs up to the mod definitions to disable sourcegen 2022-07-24 10:38:34 +02:00
Amos Wenger
753456232b Disable all source-gen tests at compile time 2022-07-24 10:38:28 +02:00
Amos Wenger
107e2653a6 Don't run slow tests in Rust CI, only RA CI 2022-07-24 10:38:19 +02:00
Amos Wenger
44f50c5fd2 Add comment about CARGO_WORKSPACE_DIR 2022-07-24 10:38:12 +02:00
Amos Wenger
37ed531fcc Use top-level path in tool Step 2022-07-24 10:38:06 +02:00
Amos Wenger
d42b28af41 Allow cross-compiling, build all crates 2022-07-24 10:37:59 +02:00
Amos Wenger
4dedb5830f Use compiler.stage
Co-authored-by: Joshua Nelson <github@jyn.dev>
2022-07-24 10:37:53 +02:00
Amos Wenger
4ea2f8e48f Add test step for rust-analyzer, run it by default 2022-07-24 10:37:47 +02:00
Amos Wenger
d59abcf9b3 Check only tests and benches, not examples 2022-07-24 10:37:40 +02:00
Amos Wenger
9cf485c3db Add check step, stuck on 'no output generated for libgoto_def-hash rmeta' 2022-07-24 10:37:36 +02:00
Amos Wenger
0f2266d3cc Convert rust-analyzer to 'in-tree' tool, pass 'in-rust-tree' feature by default 2022-07-24 10:37:29 +02:00
Amos Wenger
43acb501b9 Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
git-subtree-dir: src/tools/rust-analyzer
git-subtree-mainline: 3c98486a0c
git-subtree-split: 977e12a0bd
2022-07-24 10:37:08 +02:00
Amos Wenger
3c98486a0c Remove rust-analyzer submodule 2022-07-24 10:36:44 +02:00
Deadbeef
666022730f Instantiate constness in wfcheck 2022-07-24 07:57:05 +00:00
bors
35a0617248 Auto merge of #98674 - RalfJung:miri-stacktrace-pruning, r=Mark-Simulacrum
miri: prune some atomic operation and raw pointer details from stacktrace

Since Miri removes `track_caller` frames from the stacktrace, adding that attribute can help make backtraces more readable (similar to how it makes panic locations better). I made them only show up with `cfg(miri)` to make sure the extra arguments induced by `track_caller` do not cause any runtime performance trouble.

This is also testing the waters for whether the libs team is okay with having these attributes in their code, or whether you'd prefer if we find some other way to do this. If you are fine with this, we will probably want to add it to a lot more functions (all the other atomic operations, to start).

Before:
```
error: Undefined Behavior: Data race detected between Atomic Load on Thread(id = 2) and Write on Thread(id = 1) at alloc1727 (current vector clock = VClock([9, 0, 6]), conflicting timestamp = VClock([0, 6]))
    --> /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:2594:23
     |
2594 |             SeqCst => intrinsics::atomic_load_seqcst(dst),
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on Thread(id = 2) and Write on Thread(id = 1) at alloc1727 (current vector clock = VClock([9, 0, 6]), conflicting timestamp = VClock([0, 6]))
     |
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

     = note: inside `std::sync::atomic::atomic_load::<usize>` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:2594:23
     = note: inside `std::sync::atomic::AtomicUsize::load` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1719:26
note: inside closure at ../miri/tests/fail/data_race/atomic_read_na_write_race1.rs:22:13
    --> ../miri/tests/fail/data_race/atomic_read_na_write_race1.rs:22:13
     |
22   |             (&*c.0).load(Ordering::SeqCst)
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

After:
```
error: Undefined Behavior: Data race detected between Atomic Load on Thread(id = 2) and Write on Thread(id = 1) at alloc1727 (current vector clock = VClock([9, 0, 6]), conflicting timestamp = VClock([0, 6]))
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:22:13
   |
22 |             (&*c.0).load(Ordering::SeqCst)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on Thread(id = 2) and Write on Thread(id = 1) at alloc1727 (current vector clock = VClock([9, 0, 6]), conflicting timestamp = VClock([0, 6]))
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

   = note: inside closure at tests/fail/data_race/atomic_read_na_write_race1.rs:22:13
```
2022-07-24 06:46:46 +00:00
Michael Goulet
f7326989e6 Use VecMap::get in ConstraintLocator::check 2022-07-24 05:51:03 +00:00
Phosra
4855392111
Remove mut 2022-07-23 21:22:43 -07:00