David Tolnay
39809c5f68
Replace a try_fold in rustc_transmute to use ControlFlow instead of Result
2022-08-17 17:20:42 -07:00
David Tolnay
83f081fc01
Remove unstable Result::into_ok_or_err
2022-08-17 17:20:42 -07:00
Michael Goulet
64bd8c1dc4
Make same_type_modulo_infer a proper TypeRelation
2022-08-17 19:02:55 +00:00
Camille GILLOT
be2641a61f
Fortify check for const generics.
2022-08-17 20:22:52 +02:00
Camille GILLOT
86645c9cf7
Ignore substs when checking inlining history.
2022-08-17 19:25:09 +02:00
Michael Goulet
fc7fc0fae5
ty::Error does not match other types for region constraints
2022-08-17 17:23:52 +00:00
Camille GILLOT
3e67bded92
Make names more explicit.
2022-08-17 19:20:28 +02:00
Camille GILLOT
b2a17e9bd1
Keep ctxt in encoded span representation.
2022-08-17 19:18:33 +02:00
Xiretza
e8499cfadc
Migrate "invalid variable declaration" errors to SessionDiagnostic
2022-08-17 19:08:37 +02:00
lcnr
736288f221
dedup some code
2022-08-17 18:14:25 +02:00
nidnogg
a468f13162
Hotfix for duplicated slug name on VarStillRepeating struct
2022-08-17 13:13:07 -03:00
nidnogg
caab20c431
Moved structs to rustc_expand::errors, added several more migrations, fixed slug name
2022-08-17 11:20:37 -03:00
nidnogg
c6f9a9c410
Moved structs to rustc_expand::errors, added several more migrations, fixed slug name
2022-08-17 11:18:19 -03:00
PragmaTwice
9efe979511
remove #[primary_span]
2022-08-17 22:08:06 +08:00
Twice
52418d661b
use suggestion_short in LintDiagnostic
...
Co-authored-by: David Wood <agile.lion3441@fuligin.ink >
2022-08-17 20:45:18 +08:00
Christopher Durham
767239f740
Reenable early feature-gates as future-compat warnings
2022-08-17 06:53:18 -05:00
Christopher Durham
e9e46c95ce
Don't treat stashed warnings as errors
2022-08-17 06:07:33 -05:00
lcnr
f57e6fa453
compare_predicate_entailment move comment
2022-08-17 12:54:12 +02:00
Matthias Krüger
6eed54a2c9
Rollup merge of #100652 - compiler-errors:no-defer-sized-checks, r=TaKO8Ki
...
Remove deferred sized checks (make them eager)
Improves diagnostics spans... this doesn't seem to be the case anymore:
```rust
// Some additional `Sized` obligations badly affect type inference.
// These obligations are added in a later stage of typeck.
pub(super) deferred_sized_obligations:
RefCell<Vec<(Ty<'tcx>, Span, traits::ObligationCauseCode<'tcx>)>>,
```
2022-08-17 12:32:57 +02:00
Matthias Krüger
c0297e2330
Rollup merge of #100646 - finalchild:emoji-diag, r=compiler-errors
...
Migrate emoji identifier diagnostics to `SessionDiagnostic` in rustc_interface
* Migrate emoji identifier diagnostics to `interface_ferris_identifier` and `interface_emoji_identifier`.
This is my first PR! I'm learning how to migrate these diagnostics. Thanks in advance.
r? rust-lang/diagnostics
2022-08-17 12:32:56 +02:00
Matthias Krüger
64cd65758c
Rollup merge of #100621 - taiki-e:armv4t-atomics-32, r=cuviper
...
Pass +atomics-32 feature for {arm,thumb}v4t-none-eabi
Similar to 89582e8193 , but for ARMv4t.
Pre-v6 ARM target does not have atomic CAS, except for Linux and Android where atomic CAS is provided by compiler-builtins. So, there is a similar issue as thumbv6m.
I have confirmed that enabling the `atomics-32` target feature fixes the problem in the project affected by this issue. (https://github.com/taiki-e/portable-atomic/pull/28#discussion_r946604136 )
Closes #100619
r? ``@nikic``
cc ``@Lokathor``
2022-08-17 12:32:55 +02:00
Matthias Krüger
d956734f9f
Rollup merge of #100608 - tshepang:needless-separation, r=TaKO8Ki
...
needless separation of impl blocks
2022-08-17 12:32:54 +02:00
Matthias Krüger
1e93994b4d
Rollup merge of #100489 - lcnr:is_knowable-Result, r=davidtwco
...
`is_knowable` use `Result` instead of `Option`
2022-08-17 12:32:52 +02:00
Matthias Krüger
1948288615
Rollup merge of #100389 - compiler-errors:return-type-suggestion-cycle, r=cjgillot
...
Do not report cycle error when inferring return type for suggestion
The UI test is a good example of a case where this happens. The cycle is due to needing the value of the return type `-> _` to compute the variances of items in the crate, but then needing the variances of the items in the crate to do typechecking to infer what `-> _`'s real type is.
Since we're already gonna emit an error in astconv, just delay the cycle bug as an error.
2022-08-17 12:32:51 +02:00
Matthias Krüger
989e4ffc7c
Rollup merge of #100379 - davidtwco:triagebot-diag, r=Mark-Simulacrum
...
triagebot: add translation-related mention groups
- Move some code around so that triagebot can ping relevant parties when translation logic is modified.
- Add mention groups to triagebot for translation-related files/folders.
- Auto-label pull requests with changes to translation-related files/folders with `A-translation`.
r? `@Mark-Simulacrum`
2022-08-17 12:32:50 +02:00
Matthias Krüger
d5dca26a94
Rollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov
...
Clean up `LitKind`
r? ``@petrochenkov``
2022-08-17 12:32:49 +02:00
Matthias Krüger
bb77336c0a
Rollup merge of #99972 - RalfJung:1zst, r=lcnr
...
interpret: only consider 1-ZST when searching for receiver
`repr(transparent)` currently entirely rejects ZST with alignment larger than 1 (which is odd, arguably [this](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=02870f29396fa948c3123cb53d869ad1 ) should be accepted), so this should be safe. And if it ever isn't safe then that is very likely a bug elsewhere in the compiler.
2022-08-17 12:32:48 +02:00
lcnr
4fe666ee64
implied_bounds: clarify our assumptions
2022-08-17 12:22:32 +02:00
PragmaTwice
98fb65eff9
Migrate lint reports in typeck::check_unused to LintDiagnostic
2022-08-17 17:47:44 +08:00
ouz-a
7b45718484
pass when where clause found
2022-08-17 12:25:52 +03:00
lcnr
b7a8496a07
add List::as_slice
2022-08-17 11:22:47 +02:00
Xiretza
d3bf103d1b
Fix documentation of rustc_parse::parser::Parser::parse_stmt_without_recovery
...
Something seems to have gotten out of sync during the creation of #81177 ,
where both the argument and comment were introduced.
2022-08-17 11:18:48 +02:00
Krasimir Georgiev
7cba1f9eab
llvm-wrapper: use new pass manager for thin lto with LLVM version 15
...
No functional changes intended.
LLVM commit 633f5663c3 removed `createWriteThinLTOBitcodePass`.
This adapts PassWrapper similarly to the example mentioned upstream: 633f5663c3 .
2022-08-17 09:16:37 +00:00
lcnr
1cede2c126
is_knowable use Result instead of Option
2022-08-17 10:17:54 +02:00
Nicholas Nethercote
6cd40d0e51
Remove attrs arg from typaram and mk_ty_param.
...
Because it's always empty.
2022-08-17 12:33:42 +10:00
Nicholas Nethercote
2c24958cfd
Remove TraitDef::attributes.
...
Because it's always empty.
2022-08-17 12:29:02 +10:00
Josh Stone
147032a618
Move the cast_float_to_int fallback code to GCC
...
Now that we require at least LLVM 13, that codegen backend is always
using its intrinsic `fptosi.sat` and `fptoui.sat` conversions, so it
doesn't need the manual implementation. However, the GCC backend still
needs it, so we can move all of that code down there.
2022-08-16 15:46:17 -07:00
Michael Goulet
33212bf7f5
Remove deferred sized checks
2022-08-16 22:30:56 +00:00
nidnogg
72ce216def
Previous commit under x.py fmt
2022-08-16 19:19:59 -03:00
Nicholas Nethercote
eafd0dfd05
Box the MacCall in various types.
2022-08-17 08:10:56 +10:00
nidnogg
be18a9bf75
Migrated more diagnostics under transcribe.rs
2022-08-16 19:02:51 -03:00
nidnogg
7e15fbab75
Added first migration for repeated expressions without syntax vars
2022-08-16 18:34:13 -03:00
bors
86c6ebee8f
Auto merge of #100644 - TaKO8Ki:rollup-n0o6a1t, r=TaKO8Ki
...
Rollup of 4 pull requests
Successful merges:
- #100243 (Remove opt_remap_env_constness from rustc_query_impl)
- #100625 (Add `IpDisplayBuffer` helper struct.)
- #100629 (Use `merged_ty` method instead of rewriting it every time)
- #100630 (rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-16 21:10:08 +00:00
Takayuki Maeda
033387a6af
Rollup merge of #100629 - GuillaumeGomez:merged-ty, r=compiler-errors
...
Use `merged_ty` method instead of rewriting it every time
`merged_ty` [source code](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_typeck/check/coercion.rs.html#1331-1333 ) is quite literally the same, so instead of rewriting it, makes more sense to use the method instead.
r? `@compiler-errors`
2022-08-17 05:08:04 +09:00
Takayuki Maeda
e6d47925af
Rollup merge of #100243 - kckeiks:remove-macros-in-query-system, r=cjgillot
...
Remove opt_remap_env_constness from rustc_query_impl
1st task off #96524 .
r? `@cjgillot`
2022-08-17 05:08:02 +09:00
finalchild
c1a98416e3
Migrate emoji identifier diagnostics to SessionDiagnostic
2022-08-17 05:07:47 +09:00
Takayuki Maeda
1886aef035
point at a type parameter shadowing another type
2022-08-17 04:53:06 +09:00
Corwin
ed27a4c516
add the armv4t-none-eabi target
2022-08-16 20:10:31 +01:00
bors
5746c752f4
Auto merge of #100626 - Dylan-DPC:rollup-mwbm7kj, r=Dylan-DPC
...
Rollup of 6 pull requests
Successful merges:
- #99942 (Fix nonsense non-tupled `Fn` trait error)
- #100609 (Extend invalid floating point literal suffix suggestion)
- #100610 (Ast and parser tweaks)
- #100613 (compiletest: fix typo in runtest.rs)
- #100616 (⬆️ rust-analyzer)
- #100622 (Support 128-bit atomics on all aarch64 targets)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-16 18:07:02 +00:00
Tim van Elsloo
9233298e71
Revert "Revert "Allow dynamic linking for iOS/tvOS targets.""
...
This reverts commit 16e10bf81e .
# Conflicts:
# compiler/rustc_target/src/spec/apple_sdk_base.rs
2022-08-16 17:36:25 +02:00