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 10 pull requests #69724

Closed
wants to merge 29 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

kornelski and others added 29 commits March 1, 2020 13:46
Fix rust-lang#69602, introduced in rust-lang#60126 by letting the compiler continue past
type checking after encountering errors.
The Result can be expect-unwrapped directly. (clippy::ok_expect)
…nd anything.

For example:  `if let Some(_) = foo() {}`	can be reduced to	`if foo().is_some() {}`   (clippy::redundant_pattern_matching)
… type.

These were introduced since I last fixed most of these occurences. (clippy::clone_on_copy, clippy::single_char_pattern)
Make error message clearer about creating new module

This is a partial improvement for rust-lang#69492
ast: `Mac`/`Macro` -> `MacCall`

It's now obvious that these refer to macro calls rather than to macro definitions.

It's also a single name instead of two different names in different places.

`rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls.

cc rust-lang#63586 (comment)
r? @eddyb
`delay_span_bug` when codegen cannot select obligation

Fix rust-lang#69602, introduced in rust-lang#60126 by letting the compiler continue past
type checking after encountering errors.
Update books

## nomicon

8 commits in 3e6e1001dc6e095dbd5c88005e80969f60e384e1..9f797e65e6bcc79419975b17aff8e21c9adc039f
2019-12-14 22:08:52 +0000 to 2020-03-04 03:45:13 +0100
- Rustup to latest rustc (rust-lang/nomicon#203)
- (minor) Add backticks around type names (rust-lang/nomicon#197)
- Add book.toml (rust-lang/nomicon#185)
- Rename `Alloc` to `AllocRef` (rust-lang/nomicon#188)
- Lifetimes: explain how to fix destructor example (rust-lang/nomicon#195)
- mention soundness (rust-lang/nomicon#194)
- Fix example in FFI section Calling Rust from C (rust-lang/nomicon#193)
- Removed repeated word (rust-lang/nomicon#191)

## reference

8 commits in 64239df..559e09c
2020-02-10 19:05:13 +0100 to 2020-03-02 01:17:14 +0100
- Syntax error fix (rust-lang/reference#769)
- Fix incorrect pseudocode for #[repr(C)] struct alignment (rust-lang/reference#766)
- Replace "Field-Less" with "Fieldless" (rust-lang/reference#768)
- Removed repeated word (rust-lang/reference#767)
- Update for change in const lint name. (rust-lang/reference#764)
- semantic type -> resolved type (rust-lang/reference#761)
- add behavior change of relative paths without `self` in 2018 edition (rust-lang/reference#757)
- assignment operator expressions -> compound assignment expressions (rust-lang/reference#759)

## rust-by-example

3 commits in 32facd5522ddbbf37baf01e4e4b6562bc55c071a..db57f899ea2a56a544c8d280cbf033438666273d
2020-02-11 09:25:06 -0300 to 2020-02-18 17:46:46 -0300
- Minor typo fix in src/mod/visibility (rust-lang/rust-by-example#1309)
- Don't suggest Into implements a reverse conversion (rust-lang/rust-by-example#1307)
- Improve grammar in example of 'in let' section (rust-lang/rust-by-example#1308)

## embedded-book

2 commits in b2e1092bf67bd4d7686c4553f186edbb7f5f92db..b81ffb7a6f4c5aaed92786e770e99db116aa4ebd
2020-01-30 08:45:46 +0000 to 2020-02-27 08:06:04 +0000
- Setting output to `high` needs a `true` argument  (rust-embedded/book#227)
- Add licence notes to index.md  (rust-embedded/book#226)
Use associated constants of integer types

Take advantage of rust-lang#68952 in the interpreter and some nearby modules :)
…ta, r=Mark-Simulacrum

Toolstate: remove redundant beta-week check.

I made a bit of a mistake in rust-lang#69624.  The "beta regression" doesn't need to be checked twice.

I also rolled up rust-lang#69693 to avoid merge conflicts.
more clippy cleanups

* Don't use .ok() before unwrapping via .expect() on a Result.
* Use .map() to modify data inside Options instead of using .and_then(|x| Some(y))
* Use .as_deref() instead of .as_ref().map(Deref::deref)
* Don't use "if let" bindings to only check a value and not actually bind anything.
* Use single-char patter on {ends,starts}_with and remove clone on copy type.
@JohnTitor
Copy link
Member Author

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Mar 5, 2020

📌 Commit 5089e11 has been approved by JohnTitor

@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 Mar 5, 2020
@bors
Copy link
Contributor

bors commented Mar 5, 2020

⌛ Testing commit 5089e11 with merge f6c22f0...

bors added a commit that referenced this pull request Mar 5, 2020
Rollup of 10 pull requests

Successful merges:

 - #69520 (Make error message clearer about creating new module)
 - #69589 (ast: `Mac`/`Macro` -> `MacCall`)
 - #69614 (`delay_span_bug` when codegen cannot select obligation)
 - #69641 (Update books)
 - #69674 (Rename DefKind::Method and TraitItemKind::Method )
 - #69697 (Add explanation for E0380)
 - #69698 (Use associated constants of integer types)
 - #69705 (Toolstate: remove redundant beta-week check.)
 - #69711 (Update macros.rs: fix documentation typo.)
 - #69713 (more clippy cleanups)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Mar 5, 2020

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-tools of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-05T09:37:58.3087575Z    Compiling clippy_lints v0.0.212 (/checkout/src/tools/clippy/clippy_lints)
2020-03-05T09:38:00.7931206Z error[E0432]: unresolved import `rustc_ast::ast::Mac`
2020-03-05T09:38:00.7932267Z  --> src/tools/clippy/clippy_lints/src/non_expressive_names.rs:3:92
2020-03-05T09:38:00.7932829Z   |
2020-03-05T09:38:00.7933887Z 3 |     Arm, AssocItem, AssocItemKind, Attribute, Block, FnDecl, Ident, Item, ItemKind, Local, Mac, Pat, PatKind,
2020-03-05T09:38:00.7935165Z   |                                                                                            ^^^ no `Mac` in `ast`
2020-03-05T09:38:00.7978692Z error[E0432]: unresolved import `rustc_ast::ast::Mac`
2020-03-05T09:38:00.7979316Z  --> src/tools/clippy/clippy_lints/src/write.rs:5:38
2020-03-05T09:38:00.7979752Z   |
2020-03-05T09:38:00.7979752Z   |
2020-03-05T09:38:00.7980315Z 5 | use rustc_ast::ast::{Expr, ExprKind, Mac, StrLit, StrStyle};
2020-03-05T09:38:00.7981437Z   |                                      ^^^ no `Mac` in `ast`
2020-03-05T09:38:01.1108136Z error[E0412]: cannot find type `Mac` in module `ast`
2020-03-05T09:38:01.1108824Z   --> src/tools/clippy/clippy_lints/src/dbg_macro.rs:33:63
2020-03-05T09:38:01.1109273Z    |
2020-03-05T09:38:01.1109273Z    |
2020-03-05T09:38:01.1109906Z 33 |     fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::Mac) {
2020-03-05T09:38:01.1111374Z    |
2020-03-05T09:38:01.1111993Z help: there is an enum variant `rustc_ast::ast::ExprPrecedence::Mac`; try using the variant's enum
2020-03-05T09:38:01.1112545Z    |
2020-03-05T09:38:01.1112545Z    |
2020-03-05T09:38:01.1113206Z 33 |     fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &rustc_ast::ast::ExprPrecedence) {
2020-03-05T09:38:01.1119527Z 
2020-03-05T09:38:03.0104568Z [RUSTC-TIMING] cargo_metadata test:false 20.905
2020-03-05T09:38:03.3697307Z error[E0599]: no variant or associated item named `Mac` found for enum `rustc_ast::ast::ExprKind` in the current scope
2020-03-05T09:38:03.3698204Z    --> src/tools/clippy/clippy_lints/src/utils/sugg.rs:159:30
---
2020-03-05T09:38:04.0339195Z     |
2020-03-05T09:38:04.0340237Z 288 |                 let body = cx.tcx.hir().body(eid);
2020-03-05T09:38:04.0341835Z     |                                              ^^^
2020-03-05T09:38:04.0343015Z     |                                              |
2020-03-05T09:38:04.0344924Z     |                                              expected struct `rustc_hir::BodyId`, found `&rustc_hir::BodyId`
2020-03-05T09:38:04.0346404Z     |                                              help: consider dereferencing the borrow: `*eid`
2020-03-05T09:38:04.1374892Z error[E0599]: no variant or associated item named `Method` found for enum `rustc_hir::TraitItemKind<'_>` in the current scope
2020-03-05T09:38:04.1376539Z   --> src/tools/clippy/clippy_lints/src/inline_fn_without_body.rs:35:31
2020-03-05T09:38:04.1379162Z    |
2020-03-05T09:38:04.1380120Z 35 |         if let TraitItemKind::Method(_, TraitMethod::Required(_)) = item.kind {
---
2020-03-05T09:38:04.2155512Z 
2020-03-05T09:38:04.4368224Z error[E0308]: mismatched types
2020-03-05T09:38:04.4368810Z    --> src/tools/clippy/clippy_lints/src/lifetimes.rs:108:43
2020-03-05T09:38:04.4369260Z     |
2020-03-05T09:38:04.4369842Z 108 |             check_fn_inner(cx, &sig.decl, body, &item.generics, item.span, true);
2020-03-05T09:38:04.4370747Z     |                                           ^^^^ expected struct `rustc_hir::BodyId`, found `&rustc_hir::BodyId`
2020-03-05T09:38:04.4371988Z     = note: expected enum `std::option::Option<rustc_hir::BodyId>`
2020-03-05T09:38:04.4372624Z                found enum `std::option::Option<&rustc_hir::BodyId>`
2020-03-05T09:38:04.4372892Z 
2020-03-05T09:38:04.9481109Z error[E0599]: no variant or associated item named `Method` found for enum `rustc_hir::def::DefKind` in the current scope
---
2020-03-05T10:17:30.7585861Z Verifying status of embedded-book...
2020-03-05T10:17:30.7586501Z This PR updated 'src/doc/embedded-book', verifying if status is 'test-pass'...
2020-03-05T10:17:30.7587114Z Verifying status of rustc-guide...
2020-03-05T10:17:30.7634348Z Cloning into 'rust-toolstate'...
2020-03-05T10:17:31.4160977Z error: Tool `clippy-driver` has regressed from test-fail to build-fail during beta week.
2020-03-05T10:17:31.4178215Z Build completed unsuccessfully in 0:00:02
2020-03-05T10:17:31.4240512Z == clock drift check ==
2020-03-05T10:17:31.4251889Z   local time: Thu Mar  5 10:17:31 UTC 2020
2020-03-05T10:17:31.6904248Z   network time: Thu, 05 Mar 2020 10:17:31 GMT
2020-03-05T10:17:31.6904248Z   network time: Thu, 05 Mar 2020 10:17:31 GMT
2020-03-05T10:17:31.6904603Z == end clock drift check ==
2020-03-05T10:17:32.0101861Z 
2020-03-05T10:17:32.0177781Z ##[error]Bash exited with code '1'.
2020-03-05T10:17:32.0249445Z ##[section]Starting: Checkout rust-lang/rust@auto to s
2020-03-05T10:17:32.0253626Z ==============================================================================
2020-03-05T10:17:32.0253944Z Task         : Get sources
2020-03-05T10:17:32.0254263Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@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 Mar 5, 2020
@JohnTitor
Copy link
Member Author

Oh, I just notice we're in beta week, closing.

@JohnTitor JohnTitor closed this Mar 5, 2020
@JohnTitor JohnTitor deleted the rollup-vv7w65h branch March 5, 2020 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.