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 11 pull requests #81212

Closed
wants to merge 29 commits into from
Closed

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jan 20, 2021

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

camelid and others added 29 commits December 18, 2020 15:05
The heading style for `std::prelude` is to be consistent with the
headings for `std` and `core`: `# The Rust Standard Library` and
`# The Rust Core Library`, respectively.
- Don't add backticks for the reason a lint was removed. This is almost
never a code block, and when it is the backticks should be in the reason
itself.
- Don't assume clippy is the only tool that needs to be checked for
backwards compatibility
As it was suggested in rust-lang#81037 `SpecFromIter` is not
in the scope and therefore (even it should fail),
we get a warning when we try do document private
intems in `rust/library/alloc/`.

This fixes rust-lang#81037 by adding the trait in the scope
and also adding an `allow(unused_imports)` flag so that
the compiler does not complain, Since the trait is not used
per se in the code, it's just needed to have properly documented
docs.
It's called at the same time and in the same place as `after_krate`, so
they can be combined.
formating -> formatting
This was already implied because Any: 'static, but this makes it
explicit.
…ct, r=steveklabnik

Use consistent punctuation for 'Prelude contents' docs
…mar, r=m-ou-se

Improve grammar in documentation of format strings

The docs previously were
* using some weird `<` and `>` around some nonterminals
  * _correct me if these **did** have any meaning_
* using of a (not explicitly defined) `text` nonterminal that didn’t explicitly disallow productions containing `'{'` or `'}'`
* incorrect in not allowing for `x?` and `X?` productions of `type`
* unnecessarily ambiguous, both
  * allowing `type` to be `''`, and
  * using an optional `[type]`
* using inconsistent underscore/hyphenation style between `format_string` and `format_spec` vs `maybe-format`

_Rendered:_
![Screenshot_20210101_230901](https://user-images.githubusercontent.com/3986214/103447038-69d7a180-4c86-11eb-8fa0-0a6160a7ff7a.png)
_(current docs: https://doc.rust-lang.org/nightly/std/fmt/#syntax)_

`@rustbot` modify labels: T-doc
…ebank

Improve unknown external crate error

This improves error messages when unknown items in the crate root are encountered.

Fixes rust-lang#63799

r? `@estebank`
Fix formatting for removed lints

- Don't add backticks for the reason a lint was removed. This is almost
never a code block, and when it is the backticks should be in the reason
itself.
- Don't assume clippy is the only tool that needs to be checked for
backwards compatibility

I split this out of rust-lang#80527 because it kept causing tests to fail, and it's a good change to have anyway.

r? `@flip1995`
Visit only terminators when removing landing pads

No functional changes intended
…n514

Fix broken links with `--document-private-items` in the standard library

As it was suggested in rust-lang#81037 `SpecFromIter` is not
in the scope and therefore we get a warning when we try to
do document private intems in `rust/library/alloc/`.

This addresses rust-lang#81037 by adding the trait in the scope as `@jyn514`
suggested and also adding an `allow(unused_imports)` flag so that
the compiler does not complain, Since the trait is not used
per se in the code, it's just needed to have properly documented
docs.
Remove unnecessary `after_run` function

It's called at the same time and in the same place as `after_krate`, so
they can be combined.
Fix ICE in mir when evaluating SizeOf on unsized type

Not quite ready yet. This tries to fix rust-lang#80742 as discussed on [Zulip topic][1],
by using `delay_span_bug`.

I don't understand what `delay_span_bug` does. It seems like my error message
is never used. With this patch, in this program:

```rust
#![allow(incomplete_features)]
#![feature(const_evaluatable_checked)]
#![feature(const_generics)]

use std::fmt::Debug;
use std::marker::PhantomData;
use std::mem::size_of;

struct Inline<T>
where
    [u8; size_of::<T>() + 1]: ,
{
    _phantom: PhantomData<T>,
    buf: [u8; size_of::<T>() + 1],
}

impl<T> Inline<T>
where
    [u8; size_of::<T>() + 1]: ,
{
    pub fn new(val: T) -> Inline<T> {
        todo!()
    }
}

fn main() {
    let dst = Inline::<dyn Debug>::new(0); // line 27
}
```

these errors are printed, both for line 27 (annotated line above):

- "no function or associated item named `new` found for struct `Inline<dyn
  Debug>` in the current scope"
- "the size for values of type `dyn Debug` cannot be known at compilation time"

Second error makes sense, but I'm not sure about the first one and why it's
even printed.

Finally, I'm not sure about the span passing in `const_eval`.

[1]: https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Help.20fixing.20.2380742
Fix typo in counters.rs

formating -> formatting
Stabilize std::panic::panic_any.

This stabilizes `std::panic::panic_any`.
@rustbot rustbot added the rollup A PR which is a rollup label Jan 20, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 20, 2021

@bors r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Jan 20, 2021

📌 Commit 0cdd7f0 has been approved by m-ou-se

@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 Jan 20, 2021
@bors
Copy link
Contributor

bors commented Jan 20, 2021

⌛ Testing commit 0cdd7f0 with merge 54a53d7b57ac86f35ef20344a6868089ab44d7ad...

@bors
Copy link
Contributor

bors commented Jan 20, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 20, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 20, 2021

2021-01-20T18:14:45.1042202Z /usr/local/x86_64-sun-solaris2.10/bin/ld: cannot find -lc
2021-01-20T18:14:45.1042776Z collect2: error: ld returned 1 exit status
2021-01-20T18:14:45.1043451Z Makefile:945: recipe for target 'libgcc_s.so' failed
2021-01-20T18:14:45.1043938Z make[2]: *** [libgcc_s.so] Error 1
2021-01-20T18:14:45.1044678Z make[2]: Leaving directory '/tmp/gcc/gcc-build/x86_64-sun-solaris2.10/libgcc'
2021-01-20T18:14:45.1045535Z Makefile:11080: recipe for target 'all-target-libgcc' failed
2021-01-20T18:14:45.1046271Z make[1]: *** [all-target-libgcc] Error 2
2021-01-20T18:14:45.1046916Z make[1]: Leaving directory '/tmp/gcc/gcc-build'
2021-01-20T18:14:45.1047573Z Makefile:874: recipe for target 'all' failed
2021-01-20T18:14:45.1048013Z make: *** [all] Error 2
2021-01-20T18:14:45.1048449Z The command has failed after 5 attempts.

Uh..

@m-ou-se m-ou-se closed this Jan 20, 2021
@m-ou-se m-ou-se deleted the rollup-7ej83o3 branch January 20, 2021 18:27
@m-ou-se
Copy link
Member Author

m-ou-se commented Feb 5, 2021

For future reference: This was fixed by #81229

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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.