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

Warn for outlives lint when gats are enabled for non-gats #91853

Closed
wants to merge 2 commits into from

Conversation

jackh726
Copy link
Member

Based on #91849

The basic idea is that having a where clause allows more flexibility, as with GATs. We can't error, because of backwards compatibility.

I think this needs further discussion before merge, but opening this for that discussion.

r? @nikomatsakis

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 13, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2021
@bors
Copy link
Contributor

bors commented Dec 13, 2021

☔ The latest upstream changes (presumably #91865) made this pull request unmergeable. Please resolve the merge conflicts.

@jackh726 jackh726 force-pushed the gat-missing-recommended branch from f237342 to c018ead Compare December 14, 2021 06:00
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coding wise, r+ from me

@nikomatsakis
Copy link
Contributor

@jackh726 I'm wondering if we should rebase, make this deny-by-default, and do a crater run

@nikomatsakis
Copy link
Contributor

I think that would be the best way to move forward here. It'd be useful to have some data on what's affected and to see how many "false warnings" we get.

@jackh726
Copy link
Member Author

I'll do that this weekend. Crater queue is a bit long right now, but I dont think this is time-sensitive at all.

@nikomatsakis
Copy link
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 31, 2022
@jackh726
Copy link
Member Author

jackh726 commented Feb 7, 2022

@bors try

@bors
Copy link
Contributor

bors commented Feb 7, 2022

⌛ Trying commit cc51c4e with merge 46e9712624a97b4755100f5e467758cb4d5087e2...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling hashbrown v0.12.0
   Compiling std_detect v0.1.5 (/checkout/library/stdarch/crates/std_detect)
   Compiling miniz_oxide v0.4.0
   Compiling object v0.26.2
error: missing recommended bound on `SegmentIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:17:5
17 |     type SegmentIterator: Iterator<Item = Self::Segment>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
   |                                                         |
   |                                                         |
   |                                                         help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `Section`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:20:5
   |
   |
20 |     type Section: ObjectSection<'data>;
   |                                       |
   |                                       |
   |                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `SectionIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:23:5
   |
23 |     type SectionIterator: Iterator<Item = Self::Section>;
23 |     type SectionIterator: Iterator<Item = Self::Section>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
   |                                                         |
   |                                                         help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information

error: missing recommended bound on `ComdatIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:29:5
   |
29 |     type ComdatIterator: Iterator<Item = Self::Comdat>;
   |                                                       |
   |                                                       |
   |                                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `Symbol`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:32:5
   |
   |
32 |     type Symbol: ObjectSymbol<'data>;
   |                                     |
   |                                     |
   |                                     help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `SymbolIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:35:5
   |
   |
35 |     type SymbolIterator: Iterator<Item = Self::Symbol>;
   |                                                       |
   |                                                       |
   |                                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `SymbolTable`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:38:5
   |
38 | /     type SymbolTable: ObjectSymbolTable<
38 | /     type SymbolTable: ObjectSymbolTable<
39 | |         'data,
40 | |         Symbol = Self::Symbol,
41 | |         SymbolIterator = Self::SymbolIterator,
42 | |     >;
   | |      ^ help: add the recommended where clause: `where Self: 'file`
   | 
   |
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `DynamicRelocationIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:48:5
   |
   |
48 |     type DynamicRelocationIterator: Iterator<Item = (u64, Relocation)>;
   |                                                                       |
   |                                                                       |
   |                                                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: could not compile `object` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
Build completed unsuccessfully in 0:04:39

@bors
Copy link
Contributor

bors commented Feb 7, 2022

💔 Test failed - checks-actions

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_demangle test:false 2.745
[RUSTC-TIMING] panic_abort test:false 0.125
[RUSTC-TIMING] std_detect test:false 0.289
[RUSTC-TIMING] panic_unwind test:false 0.354
error: missing recommended bound on `SegmentIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:17:5
17 |     type SegmentIterator: Iterator<Item = Self::Segment>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
   |                                                         |
   |                                                         |
   |                                                         help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `Section`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:20:5
   |
   |
20 |     type Section: ObjectSection<'data>;
   |                                       |
   |                                       |
   |                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `SectionIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:23:5
   |
23 |     type SectionIterator: Iterator<Item = Self::Section>;
23 |     type SectionIterator: Iterator<Item = Self::Section>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
   |                                                         |
   |                                                         help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information

error: missing recommended bound on `ComdatIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:29:5
   |
29 |     type ComdatIterator: Iterator<Item = Self::Comdat>;
   |                                                       |
   |                                                       |
   |                                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `Symbol`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:32:5
   |
   |
32 |     type Symbol: ObjectSymbol<'data>;
   |                                     |
   |                                     |
   |                                     help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `SymbolIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:35:5
   |
   |
35 |     type SymbolIterator: Iterator<Item = Self::Symbol>;
   |                                                       |
   |                                                       |
   |                                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `SymbolTable`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:38:5
   |
38 | /     type SymbolTable: ObjectSymbolTable<
38 | /     type SymbolTable: ObjectSymbolTable<
39 | |         'data,
40 | |         Symbol = Self::Symbol,
41 | |         SymbolIterator = Self::SymbolIterator,
42 | |     >;
   | |      ^ help: add the recommended where clause: `where Self: 'file`
   | 
   |
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
error: missing recommended bound on `DynamicRelocationIterator`
  --> /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/object-0.26.2/src/read/traits.rs:48:5
   |
   |
48 |     type DynamicRelocationIterator: Iterator<Item = (u64, Relocation)>;
   |                                                                       |
   |                                                                       |
   |                                                                       help: add the recommended where clause: `where Self: 'file`
   |
   = note: this bound is currently recommended to ensure that impls have maximum flexibility
   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
[RUSTC-TIMING] hashbrown test:false 0.909
[RUSTC-TIMING] alloc test:false 3.617
[RUSTC-TIMING] object test:false 2.451
error: could not compile `object` due to 8 previous errors

@bors
Copy link
Contributor

bors commented Feb 15, 2022

☔ The latest upstream changes (presumably #93820) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 20, 2022
@Dylan-DPC
Copy link
Member

@jackh726 what's the update on this?

@jackh726
Copy link
Member Author

jackh726 commented Apr 8, 2022

I need to rework this a bit. It's on my list of things, but not a priority.

@Dylan-DPC
Copy link
Member

Closing this due to inactivity

@Dylan-DPC Dylan-DPC closed this Aug 10, 2022
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants