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

Implement a lint that highlights all moves larger than a configured limit #83519

Merged
merged 5 commits into from
Apr 24, 2021

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 26, 2021

Tracking issue: #83518
MCP 420 still blazing in progress

r? @pnkfelix

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 26, 2021
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the assign_shrink_your_normal_code branch from 975b1c9 to d9b6528 Compare March 26, 2021 17:02
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk force-pushed the assign_shrink_your_normal_code branch from 205236b to 601f8af Compare March 29, 2021 15:58
// edition:2018

fn main() {
let x = async { //~ ERROR large_assignments
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a particularly interesting instance of the problem (and perhaps a huge motivation for this lint).

@bors
Copy link
Contributor

bors commented Apr 2, 2021

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

@JohnCSimon
Copy link
Member

@rustbot label: -S-waiting-on-review +S-waiting-on-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 Apr 18, 2021
@pnkfelix
Copy link
Member

(i'll take over authorship here; oli already okayed me doing so.)

@pnkfelix pnkfelix force-pushed the assign_shrink_your_normal_code branch from 601f8af to 85b1c67 Compare April 20, 2021 18:22
@pnkfelix
Copy link
Member

(I rebased oli's work, but did not make any significant change to it so far. As long as I continue to not see any need for modifications, I think I can be trusted as a reviewer.)

@pnkfelix
Copy link
Member

At some point, I think the people using this will want an easy to invoke it without having to modify their source code. Right now, you can do so on nightly by using these options:

rustc /tmp/large-stuff.rs '-Zcrate-attr=feature(large_assignments)' '-Zcrate-attr=move_size_limit="1000"'

(which is not perhaps ideal, but it is good enough for now for people to get their feet wet with this.)

@pnkfelix
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 20, 2021

📌 Commit 85b1c67 has been approved by pnkfelix

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 20, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 20, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? `@pnkfelix`

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
@bors
Copy link
Contributor

bors commented Apr 21, 2021

⌛ Testing commit 85b1c67 with merge 1a254950b12c75287c4652d1dbfe2e08a3ab346f...

@bors
Copy link
Contributor

bors commented Apr 21, 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 Apr 21, 2021
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@JohnTitor
Copy link
Member

2021-04-21T08:02:23.5205676Z ##[section]Starting: Request a runner to run this job
2021-04-21T08:02:28.8016165Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest-xl'
2021-04-21T08:02:28.8467672Z Can't find any online and idle self-hosted runner in current repository's organization account that matches the required labels: 'ubuntu-latest-xl'
2021-04-21T08:02:28.9378485Z Found online and idle hosted runner in current repository's organization account that matches the required labels: 'ubuntu-latest-xl'
2021-04-21T08:02:29.0355646Z ##[section]Finishing: Request a runner to run this job

@bors retry

@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 Apr 24, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? `@pnkfelix`

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ``@pnkfelix``

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ```@pnkfelix```

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 24, 2021
…ode, r=pnkfelix

Implement a lint that highlights all moves larger than a configured limit

Tracking issue: rust-lang#83518
[MCP 420](rust-lang/compiler-team#420) still ~blazing~ in progress

r? ``@pnkfelix``

The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
This was referenced Apr 24, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#83519 (Implement a lint that highlights all moves larger than a configured limit)
 - rust-lang#84105 (stabilize `core::array::{from_ref,from_mut}` in `1.53.0`)
 - rust-lang#84179 (Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`)
 - rust-lang#84427 (Update Clippy)
 - rust-lang#84459 (rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`)
 - rust-lang#84460 (rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module)
 - rust-lang#84464 (rustdoc: Get rid of `clean::TypeKind`)
 - rust-lang#84518 (Clean up DOM strings)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e109aa3 into rust-lang:master Apr 24, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 24, 2021
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
Development

Successfully merging this pull request may close these issues.

8 participants