Commit Graph

211819 Commits

Author SHA1 Message Date
bors
cef44f5303 Auto merge of #105166 - matthiaskrgr:rollup-s9l6vt2, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #104614 (Add `type_ascribe!` macro as placeholder syntax for type ascription)
 - #105126 (Make `VecDeque::new_in` unstably const)
 - #105132 (Migrate summary toggle filter to CSS variable)
 - #105136 (clarify comment on Deref promotion)
 - #105137 (Add tracking issue number for `file_create_new` feature)
 - #105143 (rustdoc: use simpler CSS for setting the font on scraped examples)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-02 12:03:59 +00:00
Matthias Krüger
8e059d5968
Rollup merge of #105143 - notriddle:notriddle/scraped-example-list-font, r=GuillaumeGomez
rustdoc: use simpler CSS for setting the font on scraped examples
2022-12-02 08:28:12 +01:00
Matthias Krüger
c7edfddc2f
Rollup merge of #105137 - yjhn:patch-1, r=Dylan-DPC
Add tracking issue number for `file_create_new` feature

It was missing a tracking issue, so I opened one (#105135).
2022-12-02 08:28:11 +01:00
Matthias Krüger
46c50af977
Rollup merge of #105136 - RalfJung:deref-promotion-comment, r=oli-obk
clarify comment on Deref promotion

r? `@oli-obk`
2022-12-02 08:28:10 +01:00
Matthias Krüger
f95385b5d4
Rollup merge of #105132 - GuillaumeGomez:migrate-summary-toggle-to-var, r=notriddle
Migrate summary toggle filter to CSS variable

r? `@notriddle`
2022-12-02 08:28:09 +01:00
Matthias Krüger
4c4dec4408
Rollup merge of #105126 - Sp00ph:const_new_in, r=dtolnay
Make `VecDeque::new_in` unstably const

(See #105072)
2022-12-02 08:28:09 +01:00
Matthias Krüger
4fdc3eb176
Rollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8Ki
Add `type_ascribe!` macro as placeholder syntax for type ascription

This makes it still possible to test the internal semantics of type ascription even once the `:`-syntax is removed from the parser. The macro now gets used in a bunch of UI tests that test the semantics and not syntax of type ascription.

I might have forgotten a few tests but this should hopefully be most of them. The remaining ones will certainly be found once type ascription is removed from the parser altogether.

Part of #101728
2022-12-02 08:28:08 +01:00
bors
11663b1b48 Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillot
rustc_ast_lowering: Stop lowering imports into multiple items

Lower them into a single item with multiple resolutions instead.
This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-02 04:24:57 +00:00
bors
56c241c862 Auto merge of #105140 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2022-12-01 20:57:23 +00:00
Michael Howell
935def4df1 rustdoc: use simpler CSS for setting the font on scraped examples 2022-12-01 12:34:02 -07:00
bors
c090c6880c Auto merge of #105125 - matthiaskrgr:rollup-fr0snmj, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #105078 (Fix `expr_to_spanned_string` ICE)
 - #105087 (Extract llvm datalayout parsing out of spec module)
 - #105088 (rustdoc: remove redundant CSS `div.desc { display: block }`)
 - #105106 (Fix ICE from #105101)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-01 17:47:12 +00:00
Philipp Krones
ebf579932d
Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
Vadim Petrochenkov
b32a4edb20 rustc_ast_lowering: Stop lowering imports into multiple items
Lower them into a single item with multiple resolutions instead.
This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-01 18:51:20 +03:00
Vadim Petrochenkov
1f259ae679 rustc_hir: Change representation of import paths to support multiple resolutions 2022-12-01 18:51:05 +03:00
Ralf Jung
b7f2b1cd5c clarify comment on Deref promotion 2022-12-01 16:42:33 +01:00
Andrius Pukšta
0af5b7265d
Add tracking issue for file_create_new 2022-12-01 17:42:31 +02:00
Guillaume Gomez
188f31eba0 Add GUI test for toggle filter and opacity 2022-12-01 15:58:16 +01:00
Guillaume Gomez
f76c4b84c9 Migrate summary toggle filter to CSS variable 2022-12-01 15:55:09 +01:00
bors
367ecffe52 Auto merge of #105003 - flba-eb:only_windows, r=Mark-Simulacrum
Run Windows-only tests only on Windows

This removes the need to maintain an ignore-list of all other OSs.

See https://github.com/rust-lang/rust/pull/102305 for a similar change.
2022-12-01 14:27:34 +00:00
Vadim Petrochenkov
6cd4dd3091 rustc_hir: Relax lifetime requirements on Visitor::visit_path 2022-12-01 17:04:02 +03:00
Florian Bartels
c04d67444f Ignore gnu systems (windows-msvc only) 2022-12-01 14:40:10 +01:00
bors
d822110d3b Auto merge of #10010 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2022-12-01 13:21:51 +00:00
Philipp Krones
4063712bf4
Bump nightly version -> 2022-12-01 2022-12-01 12:55:29 +01:00
Philipp Krones
11434f270f
Merge remote-tracking branch 'upstream/master' into rustup 2022-12-01 12:55:15 +01:00
Markus Everling
c959fbe771 Fix typo in comment 2022-12-01 12:44:29 +01:00
Markus Everling
929003aacf Make VecDeque::new_in unstably const 2022-12-01 12:15:29 +01:00
Matthias Krüger
ee9eaa695c
Rollup merge of #105106 - jhpratt:issue-105101, r=TaKO8Ki
Fix ICE from #105101

Fixes #105101

Rather than comparing idents, compare spans, which should be unique to each variant.
2022-12-01 11:59:01 +01:00
Matthias Krüger
3ec9a6dd74
Rollup merge of #105088 - notriddle:notriddle/search-results-div-desc, r=GuillaumeGomez
rustdoc: remove redundant CSS `div.desc { display: block }`

DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9.
2022-12-01 11:59:00 +01:00
Matthias Krüger
adec7eeb17
Rollup merge of #105087 - HKalbasi:master, r=eddyb
Extract llvm datalayout parsing out of spec module

fix https://github.com/rust-lang/rust/pull/103693#discussion_r1033250846
2022-12-01 11:59:00 +01:00
Matthias Krüger
741f8c9166
Rollup merge of #105078 - TaKO8Ki:fix-105011, r=nnethercote
Fix `expr_to_spanned_string` ICE

Fixes #105011
2022-12-01 11:58:59 +01:00
bors
9c0bc3028a Auto merge of #104975 - JakobDegen:custom_mir_let, r=oli-obk
`#![custom_mir]`: Various improvements

This PR makes a bunch of improvements to `#![custom_mir]`. Ideally this would be 4 PRs, one for each commit, but those would take forever to get merged and be a pain to juggle. Should still be reviewed one commit at a time though.

### Commit 1: Support arbitrary `let`

Before this change, all locals used in the body need to be declared at the top of the `mir!` invocation, which is rather annoying. We attempt to change that.

Unfortunately, we still have the requirement that the output of the `mir!` macro must resolve, typecheck, etc. Because of that, we can't just accept this in the THIR -> MIR parser because something like
```rust
{
    let x = 0;
    Goto(other)
}
other = {
    RET = x;
    Return()
}
```
will fail to resolve. Instead, the implementation does macro shenanigans to find the let declarations and extract them as part of the `mir!` macro. That *works*, but it is fairly complicated and degrades debuginfo by quite a bit. Specifically, the spans for any statements and declarations that are affected by this are completely wrong. My guess is that this is a net improvement though.

One way to recover some of the debuginfo would be to not support type annotations in the `let` statements, which would allow us to parse like `let $stmt:stmt`. That seems quite surprising though.

### Commit 2: Parse consts

Reuses most of the const parsing from regular Mir building for building custom mir

### Commit 3: Parse statics

Statics are slightly weird because the Mir primitive associated with them is a reference/pointer to them, so this is factored out separately.

### Commit 4: Fix some spans

A bunch of the spans were non-ideal, so we adjust them to be much more helpful.

r? `@oli-obk`
2022-12-01 10:40:10 +00:00
nils
efea79ca80
Gate macros behind #[cfg(not(bootstrap))]
Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
2022-12-01 11:16:18 +01:00
bors
641ced4eb9 Auto merge of #10007 - Jarcho:issue_10005, r=giraffate
Fix ICE in `result_large_err` with uninhabited enums

fixes #10005
changelog: `result_large_err`: Fix ICE with uninhabited enums
2022-12-01 07:20:06 +00:00
bors
d6c4de0fb2 Auto merge of #104861 - nnethercote:attr-cleanups, r=petrochenkov
Attribute cleanups

Best reviewed one commit at a time.

r? `@petrochenkov`
2022-12-01 07:13:45 +00:00
bors
744a97b98c Auto merge of #105095 - matthiaskrgr:rollup-9pu7vrx, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #103065 (rustdoc-json: Document and Test that args can be patterns.)
 - #104865 (Don't overwrite local changes when updating submodules)
 - #104895 (Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code)
 - #105063 (Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item.)
 - #105064 (rustdoc: add comment to confusing CSS `main { min-width: 0 }`)
 - #105074 (Add Nicholas Bishop to `.mailmap`)
 - #105081 (Add a regression test for #104322)
 - #105086 (rustdoc: clean up sidebar link CSS)
 - #105091 (add Tshepang Mbambo to .mailmap)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-01 04:16:30 +00:00
Jason Newcomb
7ae5c81e9f Fix ICE in result large_err with uninhabited enums 2022-11-30 21:44:18 -05:00
bors
1dcf6add3d Auto merge of #104160 - Ayush1325:windows-args, r=m-ou-se
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-12-01 01:22:32 +00:00
bors
ee12b12be5 Auto merge of #9943 - dswij:pr-9940, r=Jarcho
manual_let_else: keep macro call on suggestion blocks

Closes #9940

changelog: [`manual_let_else`]: Do not expand macro calls on suggestions
2022-11-30 21:23:10 +00:00
Jacob Pratt
ab264ae612
Fix ICE from #105101 2022-11-30 21:18:31 +00:00
bors
1cdb06d406 Auto merge of #10001 - Jarcho:issue_9866, r=llogiq
Fix ICE in `unused_rounding`

fixes #9866
changelog: `unused_rounding`: Fix ICE when using the `_` separator
2022-11-30 19:54:25 +00:00
bors
846c9b8170 Auto merge of #9996 - Jarcho:issue_9906, r=Alexendoo
Fix `unnecessary_cast` suggestion when taking a reference

fixes #9906
changelog: `unnecessary_cast`: Fix suggestion when taking a reference
2022-11-30 19:40:22 +00:00
bors
d7d098a7e6 Auto merge of #9997 - Jarcho:issue_9901, r=llogiq
Don't lint `explicit_auto_deref` when the initial type is neither a reference, nor a receiver

fixes #9901
fixes #9777
changelog: `explicit_auto_deref`: Don't lint when the initial value is neither a reference, nor a receiver
2022-11-30 19:29:40 +00:00
Matthias Krüger
ffb071f906
Rollup merge of #105091 - tshepang:mailmap, r=compiler-errors
add Tshepang Mbambo to .mailmap

... because my surname has changed

```
# before
❯ git shortlog --summary --email | rg Tshepang
   326  Tshepang Lekhonkhobe <tshepang@gmail.com>
     8  Tshepang Mbambo <tshepang@gmail.com>

# after
❯ git shortlog --summary --email | rg Tshepang
   334  Tshepang Mbambo <tshepang@gmail.com>
2022-11-30 19:53:21 +01:00
Matthias Krüger
e005d0406f
Rollup merge of #105086 - notriddle:notriddle/sidebar-css, r=GuillaumeGomez
rustdoc: clean up sidebar link CSS

Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on.

Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-30 19:53:20 +01:00
Matthias Krüger
6c4b5a2bdb
Rollup merge of #105081 - weiznich:regression_test_for_104322, r=compiler-errors
Add a regression test for #104322

r? ``@compiler-errors``
2022-11-30 19:53:20 +01:00
Matthias Krüger
c56c377183
Rollup merge of #105074 - nicholasbishop:bishop-mailmap, r=Mark-Simulacrum
Add Nicholas Bishop to `.mailmap`
2022-11-30 19:53:19 +01:00
Matthias Krüger
4357c2d018
Rollup merge of #105064 - notriddle:notriddle/main-min-width, r=GuillaumeGomez
rustdoc: add comment to confusing CSS `main { min-width: 0 }`

This CSS was added in cad0fce205, but the reason why it was necessary was unclear. This comment makes it clear.
2022-11-30 19:53:19 +01:00
Matthias Krüger
cbf1a0ed3a
Rollup merge of #105063 - aDotInTheVoid:rdj-dont-assume-core, r=notriddle
Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item.

See https://github.com/rust-lang/rust/pull/104525#issuecomment-1330837047 and https://github.com/rust-lang/rust/pull/104525#issuecomment-1331087852 for motivation.

This still assumes that `fmt` is the first method, but thats alot less brittle than assuming it will be the only method.

Sadly, we can't use a aux crate to insulate the tests from core changes, because core is special, so all we can do is try not to depend on things that may change.
2022-11-30 19:53:18 +01:00
Matthias Krüger
eabc0720a6
Rollup merge of #104895 - chenyukang:yukang/fix-104884-serde, r=TaKO8Ki
Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code

Fixes #104884
2022-11-30 19:53:18 +01:00
Matthias Krüger
3d64420fa9
Rollup merge of #104865 - pratushrai0309:bootstrap, r=jyn514
Don't overwrite local changes when updating submodules

Fixes https://github.com/rust-lang/rust/issues/103485
2022-11-30 19:53:17 +01:00