Matthias Krüger
44200a91ba
Rollup merge of #95175 - lcnr:adt_const_params-tracking-issue, r=Dylan-DPC
...
move `adt_const_params` to its own tracking issue
the new tracking issue is #95174
r? ``@rust-lang/project-const-generics``
2022-03-21 19:48:35 +01:00
Matthias Krüger
aa9077e0c9
Rollup merge of #95166 - Urgau:check-cfg-values-unstable-book, r=petrochenkov
...
Update the unstable book with the new `values()` form of check-cfg
Forgot to update the unstable book in https://github.com/rust-lang/rust/pull/94362
r? ``@petrochenkov``
2022-03-21 19:48:34 +01:00
Matthias Krüger
7154fa5193
Rollup merge of #95129 - GuillaumeGomez:rm-source-sidebar-animation, r=jsha
...
Remove animation on source sidebar
Fixes https://github.com/rust-lang/rust/issues/95043 .
Didn't upload a demo considering how simple it is to test in a browser. :)
r? ``@jsha``
2022-03-21 19:48:33 +01:00
Matthias Krüger
08995e11f5
Rollup merge of #95116 - bjorn3:cg_clif_test_fixes, r=Dylan-DPC
...
Add needs-* directives to many tests
These are necessary to ignore tests that need features unsupported by cg_clif.
2022-03-21 19:48:32 +01:00
Matthias Krüger
e41e510c7f
Rollup merge of #95085 - ouz-a:master5, r=jackh726
...
Return err instead of ICE
Having `escaping_bound_vars` results in ICE when trying to create `ty::Binder::dummy`, to avoid it we return err like the line above. I think this requires a more sophisticated fix, I would love to investigate if mentorship is available 🤓
Fixes #95023 and #85350
2022-03-21 19:48:31 +01:00
Matthias Krüger
e3557e244e
Rollup merge of #95074 - TaKO8Ki:use-format-args-capture-and-remove-unnecessary-nesting-in-rustc-passes, r=lcnr
...
Refactor: use `format-args-capture` and remove unnecessary nested if blocks in some parts of `rust_passes`
2022-03-21 19:48:30 +01:00
Camille GILLOT
c544f108fd
Deduplicate ui-fulldeps.
2022-03-21 19:43:53 +01:00
bjorn3
c542cd7740
Add needs-asm-support directive to tests where necessary
2022-03-21 18:48:24 +01:00
b-naber
6cf3409e16
add/update tests
2022-03-21 18:47:38 +01:00
b-naber
3b9de6b087
dont try to unify unevaluated constants that contain infer vars
2022-03-21 18:47:38 +01:00
b-naber
ac0458a597
stall on on constants that contain infer vars in const_eval_resolve
2022-03-21 18:47:37 +01:00
b-naber
47f78a2487
try to evaluate in try_unify
2022-03-21 18:47:23 +01:00
ouz-a
be566f1185
Return err instead of ICE
2022-03-21 19:56:23 +03:00
lcnr
e8890aad62
move adt_const_params
to its own tracking issue
2022-03-21 16:33:42 +01:00
bors
44628f7273
Auto merge of #95169 - Smittyvb:union-test-ub, r=bjorn3
...
Don't run UB in test suite
This splits `ui/unsafe/union.rs` to make it so only the non-UB parts are run. It also means we can do more testing of the location of error messages (which are a bit different with the THIR unsafety checker). `union-modification.rs` has no UB (according to Miri), and `union.rs` has errors (but would have UB if not for those errors).
Closes #95075 .
r? `@bjorn3`
2022-03-21 15:17:08 +00:00
Takayuki Maeda
726206696e
use format-args-capture
and remove unnecessary nested if blocks in some parts of rustc_passes
...
break before the `&&`
Update compiler/rustc_passes/src/check_const.rs
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2022-03-22 00:02:18 +09:00
Mara Bos
ac6996345d
Move pthread locks to own module.
2022-03-21 15:51:25 +01:00
Smitty
9477febc49
Don't run UB in test suite
...
This splits ui/unsafe/union.rs to make it so only the non-UB parts are
run. It also means we can do more testing of the location of error
messages.
2022-03-21 09:32:26 -04:00
Loïc BRANSTETT
c6c14a040d
Update unstable book with the new values()
form for check-cfg
2022-03-21 12:59:46 +01:00
J-ZhengLi
5b6295d663
allowing [map_flatten
] to split long suggestions
...
add new function `span_lint_and_sugg_` for edges in `clippy_utils::diagnostics`
2022-03-21 14:11:22 +08:00
Deadbeef
fe5b81348f
Tidy up
2022-03-21 17:07:09 +11:00
Deadbeef
1f3ee7f32e
Rename ~const Drop
to ~const Destruct
2022-03-21 17:04:03 +11:00
Deadbeef
4df2a28aee
Add Destructible
for replacing ~const Drop
2022-03-21 17:04:02 +11:00
Jakob Degen
a2f3a17362
Disable early otherwise branch MIR opt
2022-03-20 23:25:59 -04:00
bors
051d1176b7
Auto merge of #95104 - compiler-errors:remove-ascription, r=davidtwco
...
suggest removing type ascription in bad parsing position
Not sure how to test this with the non-nightly suggestion. Didn't add a new UI test because it already manifests in an existing UI test.
Fixes #95014
2022-03-21 02:29:55 +00:00
bors
eded76b6f1
Auto merge of #95156 - audunhalland:fix-rustc_const_eval_transform-comments, r=Dylan-DPC
...
fix two comments referring to moved code (now rustc_mir_transform::generator)
This caused me some confusion when trying to find the related code.
2022-03-21 00:14:29 +00:00
Nicholas Nethercote
754dc8e66f
Move items into TtParser
as Vec
s.
...
By putting them in `TtParser`, we can reuse them for every rule in a
macro. With that done, they can be `SmallVec` instead of `Vec`, and this
is a performance win because these vectors are hot and `SmallVec`
operations are a bit slower due to always needing an "inline or heap?"
check.
2022-03-21 10:09:24 +11:00
Nicholas Nethercote
cedb787f6e
Remove MatcherPosHandle
.
...
This type was a small performance win for `html5ever`, which uses a
macro with hundreds of very simple rules that don't contain any
metavariables. But this type is complicated (extra lifetimes) and
perf-neutral for macros that do have metavariables.
This commit removes `MatcherPosHandle`, simplifying things a lot. This
increases the allocation rate for `html5ever` and similar cases a bit,
but makes things easier for follow-up changes that will improve
performance more than what we lost here.
2022-03-21 10:08:29 +11:00
Max Baumann
765cce11b1
refactor: remove need for MethodCall matching
2022-03-21 00:04:37 +01:00
Dan Gohman
6c407d0592
Add a testcase.
2022-03-20 15:56:25 -07:00
Max Baumann
4580c8a9b7
refactor: use is_lang_ctor()
2022-03-20 23:54:04 +01:00
Max Baumann
0f83753934
feat: change error message
2022-03-20 23:43:17 +01:00
Dan Gohman
95e1702284
Preserve the Windows GetLastError
error in HandleOrInvalid
.
...
In the `TryFrom<HandleOrInvalid> for OwnedHandle` and
`TryFrom<HandleOrNull> for OwnedHandle` implemenations, `forget` the
owned handle on the error path, to avoid calling `CloseHandle` on an
invalid handle. It's harmless, except that it may overwrite the
thread's `GetLastError` error.
2022-03-20 15:37:31 -07:00
bors
47b93ea5ef
Auto merge of #8559 - pickfire:patch-1, r=xFrednet
...
Fix typo in bug report
repoduce -> reproduce
---
changelog: none
2022-03-20 22:32:12 +00:00
Audun Halland
cd762d8694
fix two comments referring to moved code (rustc_mir_transform::generator)
2022-03-20 23:31:04 +01:00
bors
51558ccb8e
Auto merge of #95148 - matthiaskrgr:rollup-jsb1ld9, r=matthiaskrgr
...
Rollup of 4 pull requests
Successful merges:
- #95114 (Skip a test if symlink creation is not possible)
- #95131 (Fix docs for default rmeta filename.)
- #95135 (Fix a not emitted unmatched angle bracket error)
- #95145 (Fix typo interator->iterator)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-20 21:36:57 +00:00
bjorn3
56939ffe7d
Don't declare test_variadic_fnptr with two conflicting signatures
...
It is UB for LLVM and results in a compile error for Cranelift
2022-03-20 21:09:35 +01:00
Matthias Krüger
e33a4819df
Rollup merge of #95145 - ChayimFriedman2:patch-1, r=Dylan-DPC
...
Fix typo interator->iterator
2022-03-20 20:42:46 +01:00
Matthias Krüger
63da51db93
Rollup merge of #95135 - TaKO8Ki:fix-not-emitted-unmatched-angle-bracket-error, r=Dylan-DPC
...
Fix a not emitted unmatched angle bracket error
closes #95128
2022-03-20 20:42:45 +01:00
Matthias Krüger
7557c08048
Rollup merge of #95131 - ehuss:fix-metadata-filename, r=bjorn3
...
Fix docs for default rmeta filename.
The docs for the default filename for `--emit=metadata` was wrong, it was missing the `lib` prefix. The current implementation for that default is [here](f2661cfe34/compiler/rustc_session/src/output.rs (L140)
). Perhaps somewhat confusing, but `lib` is used for all crate types.
cc https://github.com/rust-lang/rust/issues/68839#issuecomment-1073118716
2022-03-20 20:42:44 +01:00
Matthias Krüger
3c02b5192e
Rollup merge of #95114 - ChrisDenton:symlink-test, r=the8472
...
Skip a test if symlink creation is not possible
If someone running tests on Windows does not have Developer Mode enabled then creating symlinks will fail which in turn would cause this test to fail. This can be a stumbling block for contributors.
2022-03-20 20:42:43 +01:00
Camille GILLOT
0b49d05ea3
Filter OnceNote in diagnostic infra.
2022-03-20 20:36:26 +01:00
Camille GILLOT
056951d628
Take &mut Diagnostic in emit_diagnostic.
...
Taking a Diagnostic by move would break the usual pattern
`diag.label(..).emit()`.
2022-03-20 20:36:08 +01:00
bors
c84f39e6c0
Auto merge of #95144 - RalfJung:miri, r=RalfJung
...
update Miri
2022-03-20 19:10:06 +00:00
Chayim Refael Friedman
159961fb28
Fix typo interator->iterator
2022-03-20 20:52:22 +02:00
Ralf Jung
8ebc407bde
update Miri
2022-03-20 14:30:40 -04:00
bors
4767ccec93
Auto merge of #95142 - bjorn3:sync_cg_clif-2022-03-20, r=bjorn3
...
Sync rustc_codegen_cranelift
r? `@ghost`
`@rustbot` label +A-codegen +A-cranelift +T-compiler
2022-03-20 16:29:16 +00:00
bjorn3
ce7f5ecad7
Add once_cell as allowed cg_clif dependency
2022-03-20 17:01:32 +01:00
bjorn3
ef4ce72919
Merge commit '370c397ec9169809e5ad270079712e0043514240' into sync_cg_clif-2022-03-20
2022-03-20 16:55:21 +01:00
bors
9bd53718e2
Auto merge of #95071 - RalfJung:arbitrary-self-dyn, r=oli-obk
...
Miri: implement arbitrary-self dyn receivers
Roughly follows the [codegen logic](851fcc7a54/compiler/rustc_codegen_ssa/src/mir/block.rs (L809)
).
Fixes https://github.com/rust-lang/miri/issues/1038
r? `@oli-obk` Cc `@eddyb`
2022-03-20 13:48:23 +00:00