Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #90037

Merged
merged 23 commits into from
Oct 19, 2021
Merged

Rollup of 8 pull requests #90037

merged 23 commits into from
Oct 19, 2021

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Urgau and others added 23 commits October 14, 2021 01:51
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.
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 rust-lang#89062.
No functional changes intended.

The LLVM commit
llvm/llvm-project@89b5706
moved TargetRegistry.(h|cpp) from Support to MC.
This adapts RustWrapper accordingly.
Changes from rust-lang#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.
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.
… r=nagisa

RustWrapper: adapt for an LLVM API change

No functional changes intended.

The LLVM commit
llvm/llvm-project@89b5706
moved TargetRegistry.(h|cpp) from Support to MC.
This adapts RustWrapper accordingly.
…laumeGomez

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 rust-lang#89852
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 rust-lang#89062.
…match-names, r=estebank

Suggest a case insensitive match name regardless of levenshtein distance

Fixes rust-lang#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 rust-lang#46347 (comment), 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``
…-obk

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

Changes from rust-lang#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.
… r=JohnTitor

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

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

Closes rust-lang#84957
…=lnicola

⬆️ rust-analyzer

r? ``@ghost``
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.
@rustbot rustbot added the rollup A PR which is a rollup label Oct 19, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ p=7 rollup=never

@bors
Copy link
Contributor

bors commented Oct 19, 2021

📌 Commit 5bcaf04 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 19, 2021
@bors
Copy link
Contributor

bors commented Oct 19, 2021

⌛ Testing commit 5bcaf04 with merge 2f22e63...

@bors
Copy link
Contributor

bors commented Oct 19, 2021

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 2f22e63 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 19, 2021
@bors bors merged commit 2f22e63 into rust-lang:master Oct 19, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 19, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2f22e63): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@matthiaskrgr matthiaskrgr deleted the rollup-cdfhxtn branch November 20, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.