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

fix: Fix panics with #[cfg]'d-out self parameter #11926

Merged
merged 2 commits into from Apr 7, 2022
Merged

fix: Fix panics with #[cfg]'d-out self parameter #11926

merged 2 commits into from Apr 7, 2022

Conversation

jonas-schievink
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Apr 7, 2022
11926: fix: Fix panics with `#[cfg]`'d-out `self` parameter r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
// If there's a self param in the syntax, but it is cfg'd out, remove the flag.
cov_mark::hit!(cfgd_out_self_param);
let param =
func.params.clone().next().expect("fn HAS_SELF_PARAM but no parameters allocated");
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a stdx::never?

@bors
Copy link
Contributor

bors bot commented Apr 7, 2022

Canceled.

@jonas-schievink
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 7, 2022

@bors bors bot merged commit 82fa6ad into rust-lang:master Apr 7, 2022
@jonas-schievink jonas-schievink deleted the cfg-self-panic branch April 7, 2022 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants