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 13 pull requests #89843

Closed
wants to merge 32 commits into from
Closed

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Oct 13, 2021

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mbrubeck and others added 30 commits September 28, 2021 13:23
Don't shrink the Vec (by calling into_boxed_slice) before leaking it.
This sentence was previously incomplete.
`**node_modules` in a .gitignore is the same than
`*node_modules` or `*****node_modules`.

It matches every file whose name ends with `node_modules`,
including `not_node_modules`.

The intent here was obviously to have `**/node_modules`
which is the same than just `node_modules`.
avoid suggesting the same name

sort candidates

fix a message

use `opt_def_id` instead of `def_id`

move `find_similarly_named_module_or_crate` to rustc_resolve/src/diagnostics.rs
Previously, there was no way to actually get binaries in
`build/$TARGET/stage1/bin` without building the standard library. This
makes it possible to build just the compiler. This can be useful when
the standard library isn't actually necessary for trying out your tests
(e.g. a bug that can be reproduced with only a `no_core` crate).
Avoid allocations and copying in Vec::leak

The [`Vec::leak`] method (rust-lang#62195) is currently implemented by calling `Vec::into_boxed_slice` and `Box::leak`.  This shrinks the vector before leaking it, which potentially causes a reallocation and copies the vector's contents.

By avoiding the conversion to `Box`, we can instead leak the vector without any expensive operations, just by returning a slice reference and forgetting the `Vec`.  Users who *want* to shrink the vector first can still do so by calling `shrink_to_fit` explicitly.

**Note:**  This could break code that uses `Box::from_raw` to “un-leak” the slice returned by `Vec::leak`.  However, the `Vec::leak` docs explicitly forbid this, so such code is already incorrect.

[`Vec::leak`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.leak
…ebank

suggestion for typoed crate or module

Previously, the compiler didn't suggest similarly named crates or modules. This pull request adds a suggestion for typoed crates or modules.

rust-lang#76208

before:

```
error[E0433]: failed to resolve: use of undeclared type or module `chono`
 --> src/main.rs:2:5
  |
2 | use chono::prelude::*;
  |     ^^^^^ use of undeclared type or module `chono`
```

after:

```
error[E0433]: failed to resolve: use of undeclared type or module `chono`
 --> src/main.rs:2:5
  |
2 | use chono::prelude::*;
  |     ^^^^^
  |     |
  |     use of undeclared crate or module `chono`
  |     help: a similar crate or module exists: `chrono`
```
…ulacrum

Assemble the compiler when running `x.py build`

Previously, there was no way to actually get binaries in
`build/$TARGET/stage1/bin` without building the standard library. This
makes it possible to build just the compiler. This can be useful when
the standard library isn't actually necessary for trying out your tests
(e.g. a bug that can be reproduced with only a `no_core` crate).

Closes rust-lang#73519.
add some more testcases

resolves rust-lang#52893
resolves rust-lang#68295
resolves rust-lang#87750
resolves rust-lang#88071

All these issues have been fixed according to glacier. Just adding a test so it can be closed.

Can anybody tell me why the github keywords do not work? 🤔
Please edit this post if you can fix it.
Edit explanation of test for nested type ascriptions

Fixes typo ("an ascribing") and removes extra.

Closes rust-lang#88233.
Add missing words in `Infallible` docs

This sentence was previously incomplete.
Improve CJK font in rustdoc

This PR includes:
- Fix unicode range of korean letters in `rustdoc.css`.
- Add WOFF2 format version of Noto Sans KR font.
- Shorten the font file name.
…ions, r=joshtriplett

Add #[must_use] to to_value conversions

`NonNull<T>::cast` snuck in when I wasn't looking. What a scamp!

Parent issue: rust-lang#89692

r? ```@joshtriplett```
…s-typo, r=joshtriplett

Fix uppercase/lowercase error

Fix rust-lang#89694 (comment)

r? ```@joshtriplett```
Fix invalid rules in .gitignore

`**node_modules` in a .gitignore is the same than
`*node_modules` or `*****node_modules`.

It matches every file whose name ends with `node_modules`,
including `not_node_modules`.

The intent here was obviously to have `**/node_modules`
which is the same than just `node_modules`.

Reference on git ignoring rules format: https://git-scm.com/docs/gitignore
Use Option::map_or instead of open coding it

```@rustbot``` modify labels +C-cleanup +T-compiler
…take-two, r=Mark-Simulacrum

Fix config.toml overflow-checks options

This a follow-up PR to rust-lang#87784.

Improvements:
* Add missing entries for overflow-checks to config.toml.example.
* Add --enable-overflow-checks-std option to configure script.
* Make rust.overflow-checks-stdoption default to rust.overflow-checks.

Also adds the missing  `--enable-debug-assertions-std `option to configure script.

r? ``@Mark-Simulacrum``
cc ``@jyn514``
@rustbot rustbot added the rollup A PR which is a rollup label Oct 13, 2021
@the8472
Copy link
Member Author

the8472 commented Oct 13, 2021

@bors r+ rollup=never p=13

@bors
Copy link
Contributor

bors commented Oct 13, 2021

📌 Commit c913af6 has been approved by the8472

@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 13, 2021
@the8472
Copy link
Member Author

the8472 commented Oct 13, 2021

Nvm, missed the other rollup in the queue

@the8472 the8472 closed this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.