]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoErase late-bound regions before computing vtable debuginfo name.
Michael Woerister [Tue, 19 Oct 2021 09:46:51 +0000 (11:46 +0200)]
Erase late-bound regions before computing vtable debuginfo name.

2 years agoAuto merge of #90039 - ehuss:update-cargo, r=ehuss
bors [Tue, 19 Oct 2021 11:19:54 +0000 (11:19 +0000)]
Auto merge of #90039 - ehuss:update-cargo, r=ehuss

Update cargo

6 commits in c7957a74bdcf3b11e7154c1a9401735f23ebd484..7fbbf4e8f23e3c24b8afff541dcb17e53eb5ff88
2021-10-11 20:17:07 +0000 to 2021-10-19 02:16:48 +0000
- Make future-incompat-report output more user-friendly (rust-lang/cargo#9953)
- Fix fetching git repos after a force push. (rust-lang/cargo#9979)
- Add rustc-link-args to doctest build (rust-lang/cargo#9916)
- Add the start of a basic benchmarking suite. (rust-lang/cargo#9955)
- Use forms for issue templates. (rust-lang/cargo#9970)
- Add rust_metadata to SerializedPackage (rust-lang/cargo#9967)

2 years agoUpdate test for `question_mark` to cover `Result`
dswij [Tue, 19 Oct 2021 10:27:37 +0000 (18:27 +0800)]
Update test for `question_mark` to cover `Result`

2 years agoCover `Result` for `question_mark`
dswij [Tue, 19 Oct 2021 10:26:50 +0000 (18:26 +0800)]
Cover `Result` for `question_mark`

2 years agoUpgrade browser-ui-test version to 0.4.5 (it allows to have multi-line commands)
Guillaume Gomez [Tue, 19 Oct 2021 09:25:39 +0000 (11:25 +0200)]
Upgrade browser-ui-test version to 0.4.5 (it allows to have multi-line commands)

2 years agoAuto merge of #90040 - nbdd0121:issue-90038, r=oli-obk
bors [Tue, 19 Oct 2021 08:13:35 +0000 (08:13 +0000)]
Auto merge of #90040 - nbdd0121:issue-90038, r=oli-obk

Fix wrong niche calculation when 2+ niches are placed at the start

When the niche is at the start, existing code incorrectly uses 1 instead of count for subtraction.

Fix #90038

`@rustbot` label: T-compiler

2 years agoFix issue 90038
Gary Guo [Tue, 19 Oct 2021 05:42:44 +0000 (06:42 +0100)]
Fix issue 90038

2 years agoAuto merge of #90037 - matthiaskrgr:rollup-cdfhxtn, r=matthiaskrgr
bors [Tue, 19 Oct 2021 05:04:38 +0000 (05:04 +0000)]
Auto merge of #90037 - matthiaskrgr:rollup-cdfhxtn, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #89766 (RustWrapper: adapt for an LLVM API change)
 - #89867 (Fix macro_rules! duplication when reexported in the same module)
 - #89941 (removing TLS support in x86_64-unknown-none-hermitkernel)
 - #89956 (Suggest a case insensitive match name regardless of levenshtein distance)
 - #89988 (Do not promote values with const drop that need to be dropped)
 - #89997 (Add test for issue #84957 - `str.as_bytes()` in a `const` expression)
 - #90002 (:arrow_up: rust-analyzer)
 - #90034 (Tiny tweak to Iterator::unzip() doc comment example.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoUpdate cargo
Eric Huss [Tue, 19 Oct 2021 04:22:09 +0000 (21:22 -0700)]
Update cargo

2 years agoReduce margin on h5 and h6
Jacob Hoffman-Andrews [Tue, 19 Oct 2021 04:04:38 +0000 (21:04 -0700)]
Reduce margin on h5 and h6

2 years agoRollup merge of #90034 - moxian:unzip-doc, r=cuviper
Matthias Krüger [Tue, 19 Oct 2021 03:40:56 +0000 (05:40 +0200)]
Rollup merge of #90034 - moxian:unzip-doc, r=cuviper

Tiny tweak to Iterator::unzip() doc comment example.

It's easier to figure out what it's doing and which output elements map to which input ones if the matrix we are dealing with is rectangular 2x3 rather than square 2x2.

2 years agoRollup merge of #90002 - lnicola:rust-analyzer-2021-10-18, r=lnicola
Matthias Krüger [Tue, 19 Oct 2021 03:40:55 +0000 (05:40 +0200)]
Rollup merge of #90002 - lnicola:rust-analyzer-2021-10-18, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``

2 years agoRollup merge of #89997 - cameron1024:const-str-as-bytes-ice, r=JohnTitor
Matthias Krüger [Tue, 19 Oct 2021 03:40:54 +0000 (05:40 +0200)]
Rollup merge of #89997 - cameron1024:const-str-as-bytes-ice, r=JohnTitor

Add test for issue #84957 - `str.as_bytes()` in a `const` expression

Hi, this PR adds a test for issue #84957 . I'm quite new to rustc so let me know if there's anything else that needs doing 😄

Closes #84957

2 years agoRollup merge of #89988 - tmiasko:unpromote-const-drop, r=oli-obk
Matthias Krüger [Tue, 19 Oct 2021 03:40:54 +0000 (05:40 +0200)]
Rollup merge of #89988 - tmiasko:unpromote-const-drop, r=oli-obk

Do not promote values with const drop that need to be dropped

Changes from #88558 allowed using `~const Drop` in constants by
introducing a new `NeedsNonConstDrop` qualif.

The new qualif was also used for promotion purposes, and allowed
promotion to happen for values that needs to be dropped but which
do have a const drop impl.

Since for promoted the drop implementation is never executed,
this lead to observable change in behaviour. For example:

```rust

struct Panic();

impl const Drop for Panic {
    fn drop(&mut self) {
        panic!();
    }
}

fn main() {
    let _ = &Panic();
}
```

Restore the use of `NeedsDrop` qualif during promotion to avoid the issue.

2 years agoRollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank
Matthias Krüger [Tue, 19 Oct 2021 03:40:53 +0000 (05:40 +0200)]
Rollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank

Suggest a case insensitive match name regardless of levenshtein distance

Fixes #86170

Currently, `find_best_match_for_name` only returns a case insensitive match name depending on a Levenshtein distance. It's a bit unfortunate that that hides some suggestions for typos like `Bar` -> `BAR`. That idea is from https://github.com/rust-lang/rust/pull/46347#discussion_r153701834, but I think it still makes some sense to show a candidate when we find a case insensitive match name as it's more like a typo.
Skipped the `candidate != lookup` check because the current (i.e, `levenshtein_match`) returns the exact same `Symbol` anyway but it doesn't seem to confuse anything on UI tests.

r? ``@estebank``

2 years agoRollup merge of #89941 - hermitcore:kernel, r=joshtriplett
Matthias Krüger [Tue, 19 Oct 2021 03:40:52 +0000 (05:40 +0200)]
Rollup merge of #89941 - hermitcore:kernel, r=joshtriplett

removing TLS support in x86_64-unknown-none-hermitkernel

HermitCore's kernel itself doesn't support TLS. Consequently, the entries in x86_64-unknown-none-hermitkernel should be removed. This commit should help to finalize #89062.

2 years agoRollup merge of #89867 - Urgau:fix-double-definition, r=GuillaumeGomez
Matthias Krüger [Tue, 19 Oct 2021 03:40:51 +0000 (05:40 +0200)]
Rollup merge of #89867 - Urgau:fix-double-definition, r=GuillaumeGomez

Fix macro_rules! duplication when reexported in the same module

This can append if within the same module a `#[macro_export] macro_rules!`
is declared but also a reexport of itself producing two export of the same
macro in the same module. In that case we only want to document it once.

Before:
```
Module {
    is_crate: true,
    items: [
        Id("0:4"),   // pub use crate::repro as repro2;
        Id("0:3"),   // macro_rules! repro
        Id("0:3"),   // duplicate, same as above
    ],
}
```

After:
```
Module {
    is_crate: true,
    items: [
        Id("0:4"),   // pub use crate::repro as repro2;
        Id("0:3"),   // macro_rules! repro
    ],
}
```

Fixes https://github.com/rust-lang/rust/issues/89852

2 years agoRollup merge of #89766 - krasimirgg:llvm-14-targetregistrty, r=nagisa
Matthias Krüger [Tue, 19 Oct 2021 03:40:50 +0000 (05:40 +0200)]
Rollup merge of #89766 - krasimirgg:llvm-14-targetregistrty, r=nagisa

RustWrapper: adapt for an LLVM API change

No functional changes intended.

The LLVM commit
https://github.com/llvm/llvm-project/commit/89b57061f7b769e9ea9bf6ed686e284f3e55affe
moved TargetRegistry.(h|cpp) from Support to MC.
This adapts RustWrapper accordingly.

2 years agoRemove border-bottom from most docblocks.
Jacob Hoffman-Andrews [Tue, 19 Oct 2021 03:24:41 +0000 (20:24 -0700)]
Remove border-bottom from most docblocks.

Headings in the top-doc docblock still get a border-bottom due to a rule
that covers all h2, h3, and h4. Method docblocks are generally h5, and
so don't get a border-bottom anymore.

This fixes a problem where a sub-sub-heading within a method would have
a line that went all the way across the page, creating a division that
made that sub-sub-heading look much more important than it really is.

2 years agoAuto merge of #89905 - matthiaskrgr:rev_89709_entirely, r=michaelwoerister
bors [Tue, 19 Oct 2021 02:03:21 +0000 (02:03 +0000)]
Auto merge of #89905 - matthiaskrgr:rev_89709_entirely, r=michaelwoerister

Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions…

…_2, r=petrochenkov"

The PR had some unforseen perf regressions that are not as easy to find.
Revert the PR for now.

This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing
changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef.

2 years agoformatting 🙃
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:42:01 +0000 (18:42 -0700)]
formatting 🙃

2 years agoUse real type in doc examples
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:32:00 +0000 (18:32 -0700)]
Use real type in doc examples

2 years agoRemove explicit lifetime
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:20:35 +0000 (18:20 -0700)]
Remove explicit lifetime

2 years agoRemove comment
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:03:00 +0000 (18:03 -0700)]
Remove comment

2 years agoOne more test + final tidying
Nathaniel Hamovitz [Tue, 19 Oct 2021 00:41:27 +0000 (17:41 -0700)]
One more test + final tidying

2 years agoconfig: add the option to enable LLVM tests
Augie Fackler [Mon, 18 Oct 2021 21:59:00 +0000 (17:59 -0400)]
config: add the option to enable LLVM tests

I'm working on some LLVM patches in concert with a Rust patch, and it's
helping me quite a bit to have this as an option. It doesn't seem that
hard, so I figured I'd formalize it in x.py and send it upstream.

2 years agoRevert "!: this is the commit that demonstrates the ICE"
Nathaniel Hamovitz [Tue, 19 Oct 2021 00:18:07 +0000 (17:18 -0700)]
Revert "!: this is the commit that demonstrates the ICE"

This reverts commit d85f903c91d909534003ee2ff0e16316b20687dc.

2 years ago!: this is the commit that demonstrates the ICE
Nathaniel Hamovitz [Tue, 19 Oct 2021 00:07:51 +0000 (17:07 -0700)]
!: this is the commit that demonstrates the ICE

2 years agoTiny tweak to Iterator::unzip() doc comment example.
moxian [Tue, 19 Oct 2021 00:03:51 +0000 (00:03 +0000)]
Tiny tweak to Iterator::unzip() doc comment example.

It's easier to figure out what it's doing and which output
elements map to which input ones if the matrix we are dealing
with is rectangular 2x3 rather than square 2x2.

2 years agoDon't need `rustc_attr` anymore
Nathaniel Hamovitz [Mon, 18 Oct 2021 23:53:17 +0000 (16:53 -0700)]
Don't need `rustc_attr` anymore

2 years agoImprove help message
Nathaniel Hamovitz [Mon, 18 Oct 2021 23:53:05 +0000 (16:53 -0700)]
Improve help message

2 years agoAdd test for debug logging during incremental compilation
Tyson Nottingham [Mon, 18 Oct 2021 21:00:29 +0000 (14:00 -0700)]
Add test for debug logging during incremental compilation

Debug logging during incremental compilation had been broken for some
time, until #89343 fixed it (among other things). Add a test so this is
less likely to break without being noticed. This test is nearly a copy
of the `src/test/ui/rustc-rust-log.rs` test, but tests debug logging in
the incremental compliation code paths.

2 years agoRemove comment saying that we don't build debug rustc in CI, since we do
Tyson Nottingham [Mon, 18 Oct 2021 23:25:21 +0000 (16:25 -0700)]
Remove comment saying that we don't build debug rustc in CI, since we do

2 years agoAuto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726
bors [Mon, 18 Oct 2021 23:02:53 +0000 (23:02 +0000)]
Auto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726

Remove redundant member-constraint check

impl trait will, for each lifetime in the hidden type, register a "member constraint" that says the lifetime must be equal or outlive one of the lifetimes of the impl trait. These member constraints will be solved by borrowck

But, as you can see in the big red block of removed code, there was an ad-hoc check for member constraints happening at the site where they get registered. This check had some minor effects on diagnostics, but will fall down on its feet with my big type alias impl trait refactor. So we removed it and I pulled the removal out into a (hopefully) reviewable PR that works on master directly.

2 years agoAll five `has_repr_attr` agree + are correct
Nathaniel Hamovitz [Mon, 18 Oct 2021 22:33:11 +0000 (15:33 -0700)]
All five `has_repr_attr` agree + are correct

2 years agoDo not promote values with const drop that need to be dropped
Tomasz Miąsko [Sun, 17 Oct 2021 00:00:00 +0000 (00:00 +0000)]
Do not promote values with const drop that need to be dropped

Changes from #88558 allowed using `~const Drop` in constants by
introducing a new `NeedsNonConstDrop` qualif.

The new qualif was also used for promotion purposes, and allowed
promotion to happen for values that needs to be dropped but which
do have a const drop impl.

Since for promoted the drop implementation is never executed,
this lead to observable change in behaviour. For example:

```rust

struct Panic();

impl const Drop for Panic {
    fn drop(&mut self) {
        panic!();
    }
}

fn main() {
    let _ = &Panic();
}
```

Restore the use of `NeedsDrop` qualif during promotion to avoid the issue.

2 years agoAuto merge of #89124 - cjgillot:owner-info, r=michaelwoerister
bors [Mon, 18 Oct 2021 19:53:05 +0000 (19:53 +0000)]
Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister

Index and hash HIR as part of lowering

Part of https://github.com/rust-lang/rust/pull/88186
~Based on https://github.com/rust-lang/rust/pull/88880 (see merge commit).~

Once HIR is lowered, it is later indexed by the `index_hir` query and hashed for `crate_hash`. This PR moves those post-processing steps to lowering itself. As a side objective, the HIR crate data structure is refactored as an `IndexVec<LocalDefId, Option<OwnerInfo<'hir>>>` where `OwnerInfo` stores all the relevant information for an HIR owner.

r? `@michaelwoerister`
cc `@petrochenkov`

2 years agoRename `needs_drop` to `needs_non_const_drop`
Tomasz Miąsko [Sun, 17 Oct 2021 00:00:00 +0000 (00:00 +0000)]
Rename `needs_drop` to `needs_non_const_drop`

2 years agoAdd a regression test for #89935
Yuki Okushi [Mon, 18 Oct 2021 17:43:54 +0000 (02:43 +0900)]
Add a regression test for #89935

2 years agoRevert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"
Yuki Okushi [Mon, 18 Oct 2021 17:33:38 +0000 (02:33 +0900)]
Revert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"

This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing
changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.

2 years agorustdoc: Box `ty` field of `GenericParamDefKind::Const`
Noah Lev [Mon, 18 Oct 2021 02:48:42 +0000 (19:48 -0700)]
rustdoc: Box `ty` field of `GenericParamDefKind::Const`

This cuts the size of `GenericParamDef` in half, from 104 bytes to 56
bytes. I think the extra indirection should be worth the size savings.

2 years agorustdoc: Box `default` fields of `GenericParamDefKind`
Noah Lev [Mon, 18 Oct 2021 02:38:41 +0000 (19:38 -0700)]
rustdoc: Box `default` fields of `GenericParamDefKind`

This reduces the size of `GenericParamDef` a bit, but some of the size
savings are hidden because of the `ty` field of the `Const` variant.
I will box that in the next commit.

2 years agoMember constraints already covered all of E0482 already, so that error never occurred...
Oli Scherer [Sat, 16 Oct 2021 13:54:08 +0000 (13:54 +0000)]
Member constraints already covered all of E0482 already, so that error never occurred anymore

2 years agoGuarding a loop with a check that it never runs is useless
Oli Scherer [Thu, 30 Sep 2021 15:11:05 +0000 (15:11 +0000)]
Guarding a loop with a check that it never runs is useless

2 years agoRemove unused enum variant
Oli Scherer [Sat, 25 Sep 2021 12:06:29 +0000 (12:06 +0000)]
Remove unused enum variant

2 years agoRemove regionck member constraint handling and leave it to mir borrowck
Oli Scherer [Sat, 25 Sep 2021 11:49:14 +0000 (11:49 +0000)]
Remove regionck member constraint handling and leave it to mir borrowck

2 years agoAdd test to ensure that the docblock elements left margin is as expected
Guillaume Gomez [Mon, 18 Oct 2021 14:50:31 +0000 (16:50 +0200)]
Add test to ensure that the docblock elements left margin is as expected

2 years agoAdd GUI overflow tests for constant and typedef
Guillaume Gomez [Mon, 18 Oct 2021 14:15:09 +0000 (16:15 +0200)]
Add GUI overflow tests for constant and typedef

2 years agoExploring emitting other sorts of `span`s
Nathaniel Hamovitz [Mon, 18 Oct 2021 14:02:00 +0000 (07:02 -0700)]
Exploring emitting other sorts of `span`s

2 years agoPrevent documentation page title to grow too big
Guillaume Gomez [Mon, 18 Oct 2021 13:30:03 +0000 (15:30 +0200)]
Prevent documentation page title to grow too big

2 years ago* Remove left margin on items declaration at the top of their documentation page
Guillaume Gomez [Mon, 18 Oct 2021 12:49:25 +0000 (14:49 +0200)]
* Remove left margin on items declaration at the top of their documentation page
* Rename "type-decl" into "item-decl" to reflect the change of usage

2 years agoBetter testcase names
Nathaniel Hamovitz [Mon, 18 Oct 2021 11:59:03 +0000 (04:59 -0700)]
Better testcase names

2 years agoOne more test
Nathaniel Hamovitz [Mon, 18 Oct 2021 11:22:43 +0000 (04:22 -0700)]
One more test

2 years agoAvoid overflow in `VecDeque::with_capacity_in()`.
Hans Kratz [Mon, 18 Oct 2021 11:15:45 +0000 (13:15 +0200)]
Avoid overflow in `VecDeque::with_capacity_in()`.

2 years agoStill renaming lmao
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:56:49 +0000 (03:56 -0700)]
Still renaming lmao

2 years agoImprove doc and span messages
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:52:57 +0000 (03:52 -0700)]
Improve doc and span messages

2 years agoRename stderr
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:52:37 +0000 (03:52 -0700)]
Rename stderr

2 years agoRename lint
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:45:08 +0000 (03:45 -0700)]
Rename lint

2 years agoMake more `From` impls `const`
woppopo [Mon, 18 Oct 2021 10:19:28 +0000 (19:19 +0900)]
Make more `From` impls `const`

2 years agorun rustfmt
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:16:10 +0000 (03:16 -0700)]
run rustfmt

2 years agoTidy import + update expected stderr
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:13:48 +0000 (03:13 -0700)]
Tidy import + update expected stderr

2 years agoTidy imports
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:04:50 +0000 (03:04 -0700)]
Tidy imports

2 years agoCheck for tuple structs
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:03:48 +0000 (03:03 -0700)]
Check for tuple structs

2 years agoRefactor ZS array detection again and this one seems great 👍
Nathaniel Hamovitz [Mon, 18 Oct 2021 07:51:30 +0000 (00:51 -0700)]
Refactor ZS array detection again and this one seems great 👍

2 years agoupdate testsuite and expand `if_chain`
Nathaniel Hamovitz [Mon, 18 Oct 2021 00:28:45 +0000 (17:28 -0700)]
update testsuite and expand `if_chain`

2 years agoTidy comments + tests; revert 'size-is-zero' detection
Nathaniel Hamovitz [Sun, 17 Oct 2021 05:03:08 +0000 (22:03 -0700)]
Tidy comments + tests; revert 'size-is-zero' detection

2 years agotried to simplify but it doesn't work :/
Nathaniel Hamovitz [Sun, 17 Oct 2021 00:49:13 +0000 (17:49 -0700)]
tried to simplify but it doesn't work :/

2 years agointermediate step
Nathaniel Hamovitz [Sat, 16 Oct 2021 23:13:14 +0000 (16:13 -0700)]
intermediate step

2 years agoadd multiple `get_attrs` and `includes_repr` and they all work!
Nathaniel Hamovitz [Sat, 16 Oct 2021 22:26:10 +0000 (15:26 -0700)]
add multiple `get_attrs` and `includes_repr` and they all work!

2 years agoRan `dev bless`!
Nathaniel Hamovitz [Sat, 16 Oct 2021 09:26:08 +0000 (02:26 -0700)]
Ran `dev bless`!

2 years agooutput looks fantastic
Nathaniel Hamovitz [Sat, 16 Oct 2021 09:01:17 +0000 (02:01 -0700)]
output looks fantastic

2 years agoit works i think (incl some `dbg`s)
Nathaniel Hamovitz [Sat, 16 Oct 2021 07:51:09 +0000 (00:51 -0700)]
it works i think (incl some `dbg`s)

2 years agoImplement getting an array of attributes!
Nathaniel Hamovitz [Sat, 16 Oct 2021 06:44:39 +0000 (23:44 -0700)]
Implement getting an array of attributes!

2 years agoImplement detecting trailing zero-sized array
Nathaniel Hamovitz [Fri, 15 Oct 2021 23:16:27 +0000 (16:16 -0700)]
Implement detecting trailing zero-sized array

2 years agoayy it compiles! ship it, right? 😎 /s
Nathaniel Hamovitz [Fri, 15 Oct 2021 08:31:26 +0000 (01:31 -0700)]
ayy it compiles! ship it, right? 😎 /s

why was `rustc_lint_defs` not already externed in `lib.rs`?
and how was r-a able to find it but cargo wasn't? 🤔

2 years agoWell it builds
Nathaniel Hamovitz [Fri, 15 Oct 2021 07:13:42 +0000 (00:13 -0700)]
Well it builds

2 years agoAdd boilerplate and basic tests
Nathaniel Hamovitz [Fri, 15 Oct 2021 03:08:38 +0000 (20:08 -0700)]
Add boilerplate and basic tests

2 years agoRustWrapper: adapt for an LLVM API change
Krasimir Georgiev [Mon, 11 Oct 2021 10:31:43 +0000 (12:31 +0200)]
RustWrapper: adapt for an LLVM API change

No functional changes intended.

The LLVM commit
https://github.com/llvm/llvm-project/commit/89b57061f7b769e9ea9bf6ed686e284f3e55affe
moved TargetRegistry.(h|cpp) from Support to MC.
This adapts RustWrapper accordingly.

2 years agoresolve: Use `NameBinding` for local variables and generic parameters
Vadim Petrochenkov [Sat, 18 Sep 2021 20:41:41 +0000 (23:41 +0300)]
resolve: Use `NameBinding` for local variables and generic parameters

2 years agoadd test for issue 84957
cameron [Mon, 18 Oct 2021 07:41:18 +0000 (08:41 +0100)]
add test for issue 84957

2 years agoAuto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet
bors [Mon, 18 Oct 2021 07:25:12 +0000 (07:25 +0000)]
Auto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet

Remove unneeded allow

Remove unneeded allow

changelog: none

2 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Mon, 18 Oct 2021 07:23:58 +0000 (10:23 +0300)]
:arrow_up: rust-analyzer

2 years agoRemove unneeded allow
Michael Wright [Mon, 18 Oct 2021 06:46:11 +0000 (08:46 +0200)]
Remove unneeded allow

2 years agoAuto merge of #90000 - matthiaskrgr:rollup-vj7wwur, r=matthiaskrgr
bors [Mon, 18 Oct 2021 06:46:03 +0000 (06:46 +0000)]
Auto merge of #90000 - matthiaskrgr:rollup-vj7wwur, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #89950 (bootstrap: tweak verbosity settings)
 - #89965 (Fix ICE with `let...else` and `ref mut`)
 - #89974 (Nicer error message if the user attempts to do let...else if)
 - #89987 (Check implementing type for `#[doc(hidden)]`)
 - #89989 (rustdoc: Add static size assertion for `clean::Type`)
 - #89990 (rustc_span: `Ident::invalid` -> `Ident::empty`)
 - #89993 (Remove dead code from `compiletest::json`)
 - #89996 (Bump backtrace)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #89996 - winterqt:bump-backtrace, r=Mark-Simulacrum
Matthias Krüger [Mon, 18 Oct 2021 06:13:32 +0000 (08:13 +0200)]
Rollup merge of #89996 - winterqt:bump-backtrace, r=Mark-Simulacrum

Bump backtrace

https://github.com/rust-lang/backtrace-rs/pull/446 allows binaries built with Nix on macOS to be symbolized.

2 years agoRollup merge of #89993 - pierwill:patch-1, r=Mark-Simulacrum
Matthias Krüger [Mon, 18 Oct 2021 06:13:31 +0000 (08:13 +0200)]
Rollup merge of #89993 - pierwill:patch-1, r=Mark-Simulacrum

Remove dead code from `compiletest::json`

Currently getting a dead code warning on master. Might make sense to remove.

2 years agoRollup merge of #89990 - petrochenkov:idempty, r=wesleywiser
Matthias Krüger [Mon, 18 Oct 2021 06:13:30 +0000 (08:13 +0200)]
Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser

rustc_span: `Ident::invalid` -> `Ident::empty`

The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s as well.

2 years agoRollup merge of #89990 - petrochenkov:idempty, r=wesleywiser
Matthias Krüger [Mon, 18 Oct 2021 06:13:30 +0000 (08:13 +0200)]
Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser

rustc_span: `Ident::invalid` -> `Ident::empty`

The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s as well.

2 years agoRollup merge of #89989 - camelid:type-size, r=jyn514
Matthias Krüger [Mon, 18 Oct 2021 06:13:29 +0000 (08:13 +0200)]
Rollup merge of #89989 - camelid:type-size, r=jyn514

rustdoc: Add static size assertion for `clean::Type`

r? `@jyn514`

2 years agoRollup merge of #89987 - pierwill:fix-85526-docs-hidden-assoc, r=GuillaumeGomez
Matthias Krüger [Mon, 18 Oct 2021 06:13:28 +0000 (08:13 +0200)]
Rollup merge of #89987 - pierwill:fix-85526-docs-hidden-assoc, r=GuillaumeGomez

Check implementing type for `#[doc(hidden)]`

Closes #85526.

2 years agoRollup merge of #89974 - est31:let_else_if_error, r=nagisa
Matthias Krüger [Mon, 18 Oct 2021 06:13:27 +0000 (08:13 +0200)]
Rollup merge of #89974 - est31:let_else_if_error, r=nagisa

Nicer error message if the user attempts to do let...else if

Gives a nice "conditional `else if` is not supported for `let...else`" error when encountering a `let...else if` pattern, as suggested in the [let...else tracking issue](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205).

2 years agoRollup merge of #89965 - JohnTitor:fix-let-else-ice-with-ref-mut, r=petrochenkov
Matthias Krüger [Mon, 18 Oct 2021 06:13:26 +0000 (08:13 +0200)]
Rollup merge of #89965 - JohnTitor:fix-let-else-ice-with-ref-mut, r=petrochenkov

Fix ICE with `let...else` and `ref mut`

Fixes #89960, opened for review.
I'm not satisfied with the current diagnostics, any ideas?

2 years agoRollup merge of #89950 - infinity0:master, r=Mark-Simulacrum
Matthias Krüger [Mon, 18 Oct 2021 06:13:25 +0000 (08:13 +0200)]
Rollup merge of #89950 - infinity0:master, r=Mark-Simulacrum

bootstrap: tweak verbosity settings

Currently the verbosity settings are:
- 2: RUSTC-SHIM envvars get spammed on every invocation, O(30) lines
     cargo is passed -v which outputs CLI invocations, O(5) lines
- 3: cargo is passed -vv which outputs build script output, O(0-10) lines

This commit changes it to:

- 1: cargo is passed -v, O(5) lines
- 2: cargo is passed -vv, O(10) lines
- 3: RUSTC-SHIM envvars get spammed, O(30) lines

2 years agoAdd static size assertion for `clean::GenericParamDef`
Noah Lev [Mon, 18 Oct 2021 02:40:23 +0000 (19:40 -0700)]
Add static size assertion for `clean::GenericParamDef`

2 years agobump backtrace
Winter [Mon, 18 Oct 2021 01:20:18 +0000 (21:20 -0400)]
bump backtrace

https://github.com/rust-lang/backtrace-rs/pull/446 allows binaries built
with Nix on macOS to be symbolized.

2 years agoAuto merge of #7832 - narpfel:implicit-saturating-sub-false-positive-else, r=giraffate
bors [Mon, 18 Oct 2021 00:22:48 +0000 (00:22 +0000)]
Auto merge of #7832 - narpfel:implicit-saturating-sub-false-positive-else, r=giraffate

Fix false positive of `implicit_saturating_sub` with `else` clause

Fixes #7831

changelog: Fix false positive of [`implicit_saturating_sub`] with `else` clause

2 years agoRemove dead code from `compiletest::json`
pierwill [Sun, 17 Oct 2021 22:50:35 +0000 (17:50 -0500)]
Remove dead code from `compiletest::json`

2 years agoAuto merge of #89499 - Mark-Simulacrum:with-llvm-13, r=nikic
bors [Sun, 17 Oct 2021 22:29:31 +0000 (22:29 +0000)]
Auto merge of #89499 - Mark-Simulacrum:with-llvm-13, r=nikic

Split out LLVM PGO step and use clang 13 to compile LLVM

We're seeing a PGO version mismatch error in CI logs:

    LLVM Profile Error: Runtime and instrumentation version mismatch : expected 5, but get 7

which is likely due to the version bumped here differing from that used by
rustc.

This PR fixes this by splitting out the PGO step for LLVM into a separate phase of the pgo.sh script, which nets no change to performance (see [these results](https://perf.rust-lang.org/compare.html?start=c34ac8747ca96d09cb08b8f5adddead826e77c06&end=e272c2af45f40c74dab83948235903ffbe3ad57f)). Then, it follows that up with an upgrade to LLVM/clang version 13 as our bootstrap compiler, which yields the performance improvements for this PR -- around 5%. This depends on the first step here, because otherwise we end up somehow clobbering or otherwise hurting our ability to effectively collect performance data, yielding reductions in performance for a subset of benchmarks -- it is not clear what the cause here was precisely, but the split only costs ~10 minutes and seems worthwhile.

2 years agoCheck implementing type for `#[doc(hidden)]`
pierwill [Sun, 17 Oct 2021 19:31:52 +0000 (14:31 -0500)]
Check implementing type for `#[doc(hidden)]`

Closes #85526.

2 years agoAdd static size assertion for `clean::Type`
Noah Lev [Sun, 17 Oct 2021 20:20:43 +0000 (13:20 -0700)]
Add static size assertion for `clean::Type`