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

deriving: avoid dummy Span on an artificial type_ident path #65310

Merged
merged 2 commits into from
Oct 12, 2019

Conversation

da-x
Copy link
Member

@da-x da-x commented Oct 11, 2019

The dummy Span pointed to the beginning of the source file instead to where the #[derive] is located. Later, it tripped the in_derive_expansion(span) check at src/librustc/middle/stability.rs, causing a span-less deprecation warning to be emitted.

Fixes #56195, Fixes #55417.

The dummy Span pointed to the beginning of the source file instead to
where the `#[derive]` is located. Later, it tripped the
`in_derive_expansion(span)` check at `src/librustc/middle/stability.rs`,
causing a span-less deprecation warning to be emitted.

Fixes rust-lang#56195, rust-lang#55417.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2019
@Centril
Copy link
Contributor

Centril commented Oct 11, 2019

r? @petrochenkov

@estebank
Copy link
Contributor

Can you add a ui test exercising this?

@da-x
Copy link
Member Author

da-x commented Oct 11, 2019

@estebank I have the test in e285175, is it sufficient?

@estebank
Copy link
Contributor

@da-x I'm not sure what's going on there, but I am surprised there wasn't a corresponding .stderr file. Looking at it I do not get how it is marked as build-pass.

@da-x
Copy link
Member Author

da-x commented Oct 11, 2019

@estebank The test makes sure that there are no warnings emitted in compilation. So when it passes there is no stderr. I verified that if a32aec0 is reverted the test fails - you can try this too.

@petrochenkov
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 11, 2019

📌 Commit e285175 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Oct 11, 2019
deriving: avoid dummy Span on an artificial `type_ident` path

The dummy Span pointed to the beginning of the source file instead to where the `#[derive]` is located. Later, it tripped the `in_derive_expansion(span)` check at `src/librustc/middle/stability.rs`, causing a span-less deprecation warning to be emitted.

Fixes rust-lang#56195, Fixes rust-lang#55417.
bors added a commit that referenced this pull request Oct 12, 2019
Rollup of 15 pull requests

Successful merges:

 - #64337 (libstd: Fix typos in doc)
 - #64986 (Function pointers as const generic arguments)
 - #65048 (Added doc about behavior of extend on HashMap)
 - #65191 (Add some regression tests)
 - #65200 (Add ?Sized bound to a supertrait listing in E0038 error documentation)
 - #65205 (Add long error explanation for E0568)
 - #65220 (Update LLVM for Emscripten exception handling support)
 - #65263 (Deduplicate is_{freeze,copy,sized}_raw)
 - #65266 (Mark Path::join as must_use)
 - #65276 (Don't cc rust-lang/compiler for toolstate changes)
 - #65277 (Query generator kind for error reporting)
 - #65283 (stability: Do not use `buffer_lint` after lowering to HIR)
 - #65289 (Fix suggested bound addition diagnostic)
 - #65310 (deriving: avoid dummy Span on an artificial `type_ident` path)
 - #65321 (Remove painful test that is not pulling its weight)

Failed merges:

r? @ghost
@bors bors merged commit e285175 into rust-lang:master Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
7 participants