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 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.

da-x added 2 commits 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, #55417.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Oct 11, 2019

r? @nikomatsakis

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

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Oct 11, 2019

@estebank

This comment has been minimized.

Copy link
Contributor

estebank commented Oct 11, 2019

Can you add a ui test exercising this?

@da-x

This comment has been minimized.

Copy link
Member Author

da-x commented Oct 11, 2019

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

@estebank

This comment has been minimized.

Copy link
Contributor

estebank commented Oct 11, 2019

@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Oct 11, 2019

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Oct 11, 2019

📌 Commit e285175 has been approved by petrochenkov

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 11, 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 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
4 checks passed
4 checks passed
pr Build #20191011.37 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.