Commit Graph

212110 Commits

Author SHA1 Message Date
Matthias Krüger
63ec33e929
Rollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkov
Rename `ast::Lit` as `ast::MetaItemLit`.

And some other literal cleanups.

r? `@petrochenkov`
2022-11-28 17:25:46 +01:00
Ayush Singh
348a058505
Extract WStrUnits to sys_common::wstr
This commit extracts WStrUnits from sys::windows::args to sys_common::wstr. This
allows using the same structure for other targets which use wtf8 (example UEFI).

This was originally a part of https://github.com/rust-lang/rust/pull/100316

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-28 21:17:08 +05:30
Ralf Jung
891a4da4f3 stricter alignment enforcement for ScalarPair and Vector 2022-11-28 15:09:56 +01:00
bors
8a09420ac4 Auto merge of #105008 - Dylan-DPC:rollup-wcd19yu, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #104360 (Stabilize native library modifier `verbatim`)
 - #104732 (Refactor `ty::ClosureKind` related stuff)
 - #104795 (Change multiline span ASCII art visual order)
 - #104890 (small method code cleanup)
 - #104907 (Remove `SelectionContext::infcx()` in favor of field access)
 - #104927 (Simplify some binder shifting logic)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-28 13:20:33 +00:00
bors
69df0f2c2f Auto merge of #102991 - Sp00ph:master, r=scottmcm
Update VecDeque implementation to use head+len instead of head+tail

(See #99805)

This changes `alloc::collections::VecDeque`'s internal representation from using head and tail indices to using a head index and a length field. It has a few advantages over the current design:
* It allows the buffer to be of length 0, which means the `VecDeque::new` new longer has to allocate and could be changed to a `const fn`
* It allows the `VecDeque` to fill the buffer completely, unlike the old implementation, which always had to leave a free space
* It removes the restriction for the size to be a power of two, allowing it to properly `shrink_to_fit`, unlike the old `VecDeque`
* The above points also combine to allow the `Vec<T> -> VecDeque<T>` conversion to be very cheap and guaranteed O(1). I mention this in the `From<Vec<T>>` impl, but it's not a strong guarantee just yet, as that would likely need some form of API change proposal.

All the tests seem to pass for the new `VecDeque`, with some slight adjustments.

r? `@scottmcm`
2022-11-28 10:39:47 +00:00
Neutron3529
11525e506e
fix document
https://users.rust-lang.org/t/is-the-document-in-sortedmap-in-rustc-data-structures-sorted-map-correct/84939

SortedMap have `O(n)` insertions and removal rather than `O(log(n))`
2022-11-28 18:31:55 +08:00
Dylan DPC
d5de2a8e64
Rollup merge of #104927 - compiler-errors:binder-shifting-logic, r=oli-obk
Simplify some binder shifting logic

Not sure if worth, but we'll see
2022-11-28 15:42:12 +05:30
Dylan DPC
9178bc059f
Rollup merge of #104907 - compiler-errors:selcx-infcx, r=oli-obk
Remove `SelectionContext::infcx()` in favor of field access

Encapsulation doesn't seem particularly important here, and having two choices is always more confusing than having one.

r? types
2022-11-28 15:42:11 +05:30
Dylan DPC
8a84dd8fcc
Rollup merge of #104890 - lcnr:small-cleanup, r=fee1-dead
small method code cleanup
2022-11-28 15:42:11 +05:30
Dylan DPC
79fe15c8b0
Rollup merge of #104795 - estebank:multiline-spans, r=TaKO8Ki
Change multiline span ASCII art visual order

Tweak the ASCII art for nested multiline spans so that we minimize line overlaps.

Partially addresses https://github.com/rust-lang/rust/issues/61017.
2022-11-28 15:42:10 +05:30
Dylan DPC
f90484df8a
Rollup merge of #104732 - WaffleLapkin:from_def_idn't, r=compiler-errors
Refactor `ty::ClosureKind` related stuff

I've tried to fix all duplication and weirdness, but if I missed something do tell :p

r? `@compiler-errors`
2022-11-28 15:42:10 +05:30
Dylan DPC
f33d4094f0
Rollup merge of #104360 - petrochenkov:stabverb, r=TaKO8Ki
Stabilize native library modifier `verbatim`

Stabilization report - https://github.com/rust-lang/rust/pull/104360#issuecomment-1312724787.

cc https://github.com/rust-lang/rust/issues/81490
Closes https://github.com/rust-lang/rust/issues/99425
2022-11-28 15:42:09 +05:30
Ralf Jung
58dd62a756 sanity_check_layout: less rightwards drift 2022-11-28 10:45:12 +01:00
Ralf Jung
ef5d5e7895 decreasw yield count a bit and explain reasoning a bit more 2022-11-28 10:29:15 +01:00
bors
5c2592cd43 Auto merge of #2698 - RalfJung:miri-in-rustc, r=oli-obk
replace 'locally built rustc' instructions by 'Miri in rustc'
2022-11-28 09:21:46 +00:00
Esteban Küber
fc108d4b61 fix clippy tests 2022-11-28 00:41:31 -08:00
Esteban Küber
136ffa2ab1 fix clippy tests 2022-11-28 00:41:31 -08:00
Sarthak Singh
8f705e2425 Keep track of the start of the argument block of a closure 2022-11-28 14:09:00 +05:30
Esteban Küber
6f64432a39 Tweak output 2022-11-28 00:11:12 -08:00
Esteban Küber
ab04080b56 Change multiline span ASCII art visual order 2022-11-28 00:11:12 -08:00
Ralf Jung
63eae2b30f add many-seeds capabilities to CI 2022-11-28 08:58:21 +01:00
Ralf Jung
ad9784eb3d make ./miri run a bit more silent; add option to control seeds tested by many-seeds 2022-11-28 08:53:14 +01:00
Ralf Jung
af92b04855 move interpreter loop into thread manager; they are pretty tightly coupled anyway 2022-11-28 08:53:14 +01:00
Ralf Jung
5238d17797 fix TLS on partially supported OSes 2022-11-28 08:53:14 +01:00
Ralf Jung
c9b9c17fca add scoped thread test 2022-11-28 08:53:14 +01:00
Ralf Jung
ec003fdd9c yield the main thread a number of times after its TLS dtors are done 2022-11-28 08:53:14 +01:00
Ralf Jung
0849084d06 cleanup global imports a bit 2022-11-28 08:53:14 +01:00
Ralf Jung
a0d104d5f7 refactor scheduling of TLS dtors 2022-11-28 08:53:14 +01:00
Florian Bartels
3e72a01566 Run Windows-only tests only on Windows
This removes the need to maintain a list of all other
OSs which ignore the tests.
2022-11-28 08:11:19 +01:00
Nicholas Nethercote
a60e337c88 Rename NestedMetaItem::[Ll]iteral as NestedMetaItem::[Ll]it.
We already use a mix of `Literal` and `Lit`. The latter is better
because it is shorter without causing any ambiguity.
2022-11-28 15:18:53 +11:00
Nicholas Nethercote
1c65264f3c Adjust comments on StrLit. 2022-11-28 15:18:52 +11:00
Nicholas Nethercote
5011c675ad Rename ast::Lit as ast::MetaItemLit. 2022-11-28 15:18:49 +11:00
Nicholas Nethercote
e4a9150872 Rename ast::Lit as ast::MetaItemLit. 2022-11-28 15:18:49 +11:00
Nicholas Nethercote
aa10aad1ac Factor out a repeated expression in lower_attr_args. 2022-11-28 15:17:45 +11:00
Nicholas Nethercote
8cfc8153da Remove Lit::from_included_bytes.
`Lit::from_included_bytes` calls `Lit::from_lit_kind`, but the two call
sites only need the resulting `token::Lit`, not the full `ast::Lit`.

This commit changes those call sites to use `LitKind::to_token_lit`,
which means `from_included_bytes` can be removed.
2022-11-28 15:17:45 +11:00
Nicholas Bishop
c3b280fb67 test-various: Add tests for {i686,aarch64}-unknown-uefi
This extends the existing test for x86_64-unknown-uefi to test the
other two UEFI targets as well.
2022-11-28 03:54:12 +00:00
bors
dd12cd6dc6 Auto merge of #104915 - weihanglo:update-cargo, r=ehuss
Update cargo

5 commits in ba607b23db8398723d659249d9abf5536bc322e5..e027c4b5d25af2119b1956fac42863b9b3242744 2022-11-22 20:52:39 +0000 to 2022-11-25 19:44:46 +0000

- fix: Move off atty to resolve soundness issue (rust-lang/cargo#11420)
- add newline char to `cargo install .` error message for easier reading. (rust-lang/cargo#11401)
- chore: Upgrade to env_logger (rust-lang/cargo#11417)
- Change rustdoc-scrape-examples to be a target-level configuration (rust-lang/cargo#10343)
- temporarily disable test `lto::test_profile` (rust-lang/cargo#11419)

r+ `@ghost`
2022-11-28 03:16:58 +00:00
Bruno A. Muciño
7a378dd0fb Avoid ICE if the Clone trait is not found while building error suggestions 2022-11-27 20:50:13 -06:00
Jakob Degen
bb273a17f8 Update my mailmap 2022-11-27 17:18:38 -08:00
bors
8c6bf2bee7 Auto merge of #104990 - matthiaskrgr:rollup-oskk8v3, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #104955 (Switch rustdoc-gui test to function call)
 - #104976 (Prefer doc comments over `//`-comments in compiler)
 - #104984 (Remove Crate::primitives field)
 - #104989 (update Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-28 00:18:22 +00:00
Markus Everling
b1c3c6380f Fix pretty-std test 2022-11-27 23:15:55 +01:00
Matthias Krüger
2ccb38b92d
Rollup merge of #104989 - RalfJung:miri, r=RalfJung
update Miri

r? `@ghost`
2022-11-27 22:14:09 +01:00
Matthias Krüger
5ea36cfc1c
Rollup merge of #104984 - GuillaumeGomez:remote-crate-primitives, r=notriddle
Remove Crate::primitives field

It is a new approach to #90447. Instead of removing primitives from everywhere (ie from `BadImplStripper`), I just removed them from the `Crate` type, allowing to reduce its size.

cc `@camelid`
r? `@notriddle`
2022-11-27 22:14:09 +01:00
Matthias Krüger
86304f5149
Rollup merge of #104976 - WaffleLapkin:move_comments, r=cjgillot
Prefer doc comments over `//`-comments in compiler

Doc comments are generally nicer: they show up in the documentation, they are shown in IDEs when you hover other mentions of items, etc. Thus it makes sense to use them instead of `//`-comments.
2022-11-27 22:14:08 +01:00
Matthias Krüger
53cfcfbfed
Rollup merge of #104955 - GuillaumeGomez:migrate-to-func, r=notriddle
Switch rustdoc-gui test to function call

r? `@notriddle`
2022-11-27 22:14:08 +01:00
bors
07e664c41a Auto merge of #104506 - joshtriplett:style-principles-readability-in-plain-text, r=compiler-errors
Expand a style-guide principle: readability in plain text
2022-11-27 21:07:04 +00:00
bors
f8fbc6da3c Auto merge of #2702 - RalfJung:rustup, r=RalfJung
Rustup

No changes happened on the rustc side, but I want to do a push next and would rather make josh's life easier by integrating some recent history first.
2022-11-27 19:54:04 +00:00
Ralf Jung
598c3da627 clippy 2022-11-27 20:53:17 +01:00
Ralf Jung
6d1e99e96e advice on josh pushing 2022-11-27 20:52:17 +01:00
Ralf Jung
7c12ed1d5d Merge from rustc 2022-11-27 20:51:52 +01:00