bors
acfb46db5a
Auto merge of #112711 - Emilgardis:lit_byte_char, r=dtolnay
...
implement Literal::byte_character
without this, the only way to create a `LitKind::Byte` is by
doing `"b'a'".parse::<Literal>()`, this solves that by enabling
`Literal::byte_character(b'a')`
cc #71358
The tracking issue is #115268
2023-09-23 22:38:45 +00:00
John Kåre Alsaker
ba8d53dc8f
Don't use a thread to load the dep graph
2023-09-24 00:30:43 +02:00
Emil Gardström
74f5261345
implement Literal::byte_character
...
without this, the only way to create a `LitKind::Byte` is by
doing `"b'a'".parse::<Literal>()`, this solves that by enabling
`Literal::byte_character(b'a')`
2023-09-23 23:29:47 +02:00
Ralf Jung
ab8307331a
also make platform_intrinsics internal
2023-09-23 21:30:45 +02:00
bors
13e6f24b9a
Auto merge of #107421 - cjgillot:drop-tracking-mir, r=oli-obk
...
Enable -Zdrop-tracking-mir by default
This PR enables the `drop-tracking-mir` flag by default. This flag was initially implemented in https://github.com/rust-lang/rust/pull/101692 .
This flag computes auto-traits on generators based on their analysis MIR, instead of trying to compute on the HIR body. This removes the need for HIR-based drop-tracking, as we can now reuse the same code to compute generator witness types and to compute generator interior fields.
2023-09-23 18:28:00 +00:00
Guillaume Gomez
2d25a25e5d
Migrate GUI colors test to original CSS color format
2023-09-23 20:03:03 +02:00
Caio
d63959f2fa
Add the cfg_match!
macro
2023-09-23 14:23:51 -03:00
bors
19c65022fc
Auto merge of #116047 - a-lafrance:I80836-codegen-test, r=Mark-Simulacrum
...
Add codegen test to guard against VecDeque optimization regression
Very small PR that adds a codegen test to guard against regression for the `VecDeque` optimization addressed in #80836 . Ensures that Rustc optimizes away the panic when unwrapping the result of `.get(0)` because of the `!is_empty()` condition.
2023-09-23 16:38:20 +00:00
FZs
0f248d8ea9
Clarify example in Pin::new_unchecked
docs
2023-09-23 17:28:43 +02:00
Eduardo Sánchez Muñoz
93863383c8
Avoid overflow in IoSlice::advance_slices
2023-09-23 16:27:57 +02:00
Camille GILLOT
ac0683b783
Use correct offset when codegening mir::Const::Indirect.
2023-09-23 14:07:10 +00:00
Camille GILLOT
6992405674
Tolerate non-ptr indirect scalars in codegen.
2023-09-23 14:07:10 +00:00
Camille GILLOT
8ec5639bc2
Reuse calculate_debuginfo_offset for fragments.
2023-09-23 13:52:35 +00:00
Camille GILLOT
e2669b27f3
Remove GeneratorWitness and rename GeneratorWitnessMIR.
2023-09-23 13:47:30 +00:00
Camille GILLOT
bffb3467e1
Make test more robust to opts.
2023-09-23 13:47:30 +00:00
Camille GILLOT
19e160fe2f
Bless clippy.
2023-09-23 13:47:30 +00:00
Camille GILLOT
44ac8dcc71
Remove GeneratorWitness and rename GeneratorWitnessMIR.
2023-09-23 13:47:30 +00:00
Camille GILLOT
855a75b6d6
Remove useless wrapper.
2023-09-23 13:47:30 +00:00
Camille GILLOT
baa64b0e77
Remove dead error code.
2023-09-23 13:47:30 +00:00
Camille GILLOT
6aa1268900
Bless clippy.
2023-09-23 13:47:30 +00:00
Camille GILLOT
d989e14cf2
Bless mir-opt
2023-09-23 13:47:30 +00:00
Camille GILLOT
211d2ed07b
Bless tests.
2023-09-23 13:47:30 +00:00
Camille GILLOT
0a2d39de2e
Enable drop_tracking_mir by default.
2023-09-23 13:34:09 +00:00
Camille GILLOT
286502c9ed
Enable drop_tracking_mir by default.
2023-09-23 13:34:09 +00:00
Camille GILLOT
a626caaad9
Revert duplication of tests.
2023-09-23 13:34:07 +00:00
Camille GILLOT
ff03204365
Fold lifetimes before substitution.
2023-09-23 13:15:15 +00:00
Camille GILLOT
9450b75986
Do not construct def_path_str for MustNotSuspend.
2023-09-23 13:14:57 +00:00
Eduardo Sánchez Muñoz
b6836849ac
Add regression test for issue #79865
2023-09-23 13:21:50 +02:00
bors
3050938abd
Auto merge of #116081 - compiler-errors:closure-captures-sized, r=cjgillot
...
Check that closure/generator's interior/capture types are sized
check that closure upvars and generator interiors are sized. this check is only necessary when `unsized_fn_params` or `unsized_locals` is enabled, so only check if those are active.
Fixes #93622
Fixes #61335
Fixes #68543
2023-09-23 10:01:49 +00:00
bors
0237aa3d77
Auto merge of #116045 - notriddle:notriddle/issue-83556, r=cjgillot
...
diagnostics: avoid mismatch between variance index and hir generic
This happens because variances are constructed from ty generics, and ty generics are always constructed with lifetimes first.
b3aa8e7168/compiler/rustc_hir_analysis/src/collect/generics_of.rs (L248-L269)
Fixes #83556
2023-09-23 08:11:59 +00:00
Ralf Jung
37acbbb4b5
make link_llvm_intrinsics feature internal
2023-09-23 08:39:36 +02:00
bors
136d74fab8
Auto merge of #116071 - estebank:issue-115905, r=compiler-errors
...
Point at cause of expectation of `break` value when possible
When encountering a type error within the value of a `break` statement, climb the HIR tree to identify if the expectation comes from an assignment or a return type (if the loop is the tail expression of a `fn`).
Fix #115905 .
2023-09-23 06:25:41 +00:00
Michael Howell
58ef3a0ec9
diagnostics: simpler 83556 handling by bailing out
2023-09-22 22:41:01 -07:00
bors
5ddf866c9c
Auto merge of #3077 - rust-lang:rustup-2023-09-23, r=saethlin
...
Automatic sync from rustc
2023-09-23 05:33:22 +00:00
The Miri Conjob Bot
3ca49cfe9d
Merge from rustc
2023-09-23 05:17:05 +00:00
The Miri Conjob Bot
6870634232
Preparing for merge from rustc
2023-09-23 05:10:33 +00:00
bors
3da69c7041
Auto merge of #116052 - oli-obk:ceci_nest_pas_une_query, r=WaffleLapkin
...
Add a way to decouple the implementation and the declaration of a TyCtxt method.
properly addresses https://github.com/rust-lang/rust/pull/115819
accepted MCP: https://github.com/rust-lang/compiler-team/issues/395
2023-09-23 04:41:09 +00:00
bors
bf982631df
Auto merge of #116052 - oli-obk:ceci_nest_pas_une_query, r=WaffleLapkin
...
Add a way to decouple the implementation and the declaration of a TyCtxt method.
properly addresses https://github.com/rust-lang/rust/pull/115819
accepted MCP: https://github.com/rust-lang/compiler-team/issues/395
2023-09-23 04:41:09 +00:00
Michael Goulet
79d685325c
Check types live across yields in generators too
2023-09-23 04:19:14 +00:00
Michael Goulet
c21867f9f6
Check that closure's by-value captures are sized
2023-09-23 04:19:14 +00:00
bors
2d08657901
Auto merge of #116066 - weihanglo:update-cargo, r=weihanglo
...
Update cargo
19 commits in b4ddf95ad9954118ac0dae835f2966394ad04c02..414d9e3a6d8096f3e276234ce220c868767a8792
2023-09-18 03:48:09 +0000 to 2023-09-22 07:03:57 +0000
- refactor(TomlManifest): fail when package_root is not a directory (rust-lang/cargo#12722 )
- Better suggestion for unsupported mode in build command (rust-lang/cargo#12693 )
- Update curl-sys to pull in curl 8.3.0 (rust-lang/cargo#12718 )
- chore(ci): Ignore patch version in MSRV (rust-lang/cargo#12716 )
- refactor: move cached crates.io SourceID to config module (rust-lang/cargo#12711 )
- fix: typos in registry authentication documentation (rust-lang/cargo#12714 )
- doc: mention unstable flag `-Z asymmetric-token` (rust-lang/cargo#12712 )
- fix: copy PDBs for EFI targets (rust-lang/cargo#12688 )
- infra: add auto-trigger rules for new labels (rust-lang/cargo#12713 )
- fix: use channel-specific link for registry auth error (rust-lang/cargo#12709 )
- Add some enhancements to `cargo clean` (rust-lang/cargo#12638 )
- chore: Fix typos (rust-lang/cargo#12707 )
- Shortest path (rust-lang/cargo#12678 )
- doc/reference/manifest: Adjust `keywords` description (rust-lang/cargo#12705 )
- Cargo add displays either feature list or summarized count (rust-lang/cargo#12702 )
- SemVer: Update documentation about removing optional dependencies (rust-lang/cargo#12687 )
- publish.py: Remove obsolete `sleep()` calls (rust-lang/cargo#12686 )
- generalise suggestion on abiguous spec (rust-lang/cargo#12685 )
- util/toml: Remove duplicate `serde(rename)` attributes (rust-lang/cargo#12682 )
r? ghost
2023-09-23 02:23:44 +00:00
Esteban Küber
7d8559ac90
Add test
2023-09-23 01:59:22 +00:00
Esteban Küber
ac5e18756a
Tweak wording and logic
2023-09-23 01:54:05 +00:00
Esteban Küber
0e98682576
When encountering method on Self
that we can't suggest, mention it
2023-09-23 01:47:06 +00:00
Esteban Küber
c4a4926083
More accurate suggestion for self.
and Self::
...
Fix #115992 .
2023-09-23 01:34:50 +00:00
Michael Goulet
82e7cec16d
Tweak expected message to explain what it's actually signifying
2023-09-23 00:57:17 +00:00
bors
a0defe0a26
Auto merge of #3072 - eduardosm:llvm.ctpop, r=saethlin
...
Implement `llvm.ctpop.v*` intrinsics
Tested through x86 avx512vpopcntdq and avx512bitalg functions.
I picked them from https://github.com/rust-lang/miri/issues/2057#issuecomment-1716309674 , which looked easy.
2023-09-23 00:38:26 +00:00
bors
55b5c7bfde
Auto merge of #115695 - tmiasko:compiletest-supported-sanitizers, r=oli-obk
...
compiletest: load supported sanitizers from target spec
2023-09-23 00:25:14 +00:00
Esteban Küber
d3dea30cb4
Point at cause of expectation of break
value when possible
...
Fix #115905 .
2023-09-22 22:20:53 +00:00
James Haywood
f286a75692
Extend fix to wrapping_div, wrapping_div_euclid and wrapping_rem_euclid
2023-09-22 18:07:17 -04:00