Skip to content

Fix tests most unused pattern variable warnings#3286

Closed
erickt wants to merge 6 commits into
rust-lang:incomingfrom
erickt:incoming
Closed

Fix tests most unused pattern variable warnings#3286
erickt wants to merge 6 commits into
rust-lang:incomingfrom
erickt:incoming

Conversation

@erickt

@erickt erickt commented Aug 26, 2012

Copy link
Copy Markdown
Contributor

I almost fixed all the unused variable warnings, and found a couple cases where we weren't properly using an enum because it wasn't imported. There were a couple I didn't know how to handle though:

/Users/etryzelaar/Projects/rust/rust/src/rustc/middle/ty.rs:1038:6: 1038:27 warning: unused variable: `sty`
/Users/etryzelaar/Projects/rust/rust/src/rustc/middle/ty.rs:1038       ref sty @ ty_fn(f) => {
                                                                       ^~~~~~~~~~~~~~~~~~~~~
/Users/etryzelaar/Projects/rust/rust/src/rustc/middle/ty.rs:2232:6: 2232:22 warning: unused variable: `re_bot`
/Users/etryzelaar/Projects/rust/rust/src/rustc/middle/ty.rs:2232       re_bot        => 4u
                                                                       ^~~~~~~~~~~~~~~~
/Users/etryzelaar/Projects/rust/rust/src/rustc/middle/typeck/check.rs:895:14: 895:43 warning: unused variable: `sty`
/Users/etryzelaar/Projects/rust/rust/src/rustc/middle/typeck/check.rs:895               sty @ ty::ty_fn(ref fn_ty) => {
                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm not quite sure what the sty @ ty::ty_fn(...) means, and re_bot seems like it should be a variant, but it doesn't exist.

@brson

brson commented Aug 27, 2012

Copy link
Copy Markdown
Contributor

@nikomatsakis perhaps you can review this. Are we confident that none of these unused patterns indicate bugs?

@erickt

erickt commented Aug 27, 2012

Copy link
Copy Markdown
Contributor Author

By the way, I just rebased this onto HEAD to merge in the Some/None changes.

@nikomatsakis

Copy link
Copy Markdown
Contributor

@brson I'll take a look.

Comment thread src/libsyntax/print/pp.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@graydon this was one line that I was unsure about. It seemed like it could be a bug...? But prob not

@nikomatsakis

Copy link
Copy Markdown
Contributor

I think it's pretty reasonable. There's only so many of those diffs you can look at until your eyes glaze over, but I didn't see anything that looked suspicious.

@brson

brson commented Aug 27, 2012

Copy link
Copy Markdown
Contributor

This is merged.

@brson brson closed this Aug 27, 2012
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Feb 17, 2024
jaisnan pushed a commit to jaisnan/rust-dev that referenced this pull request Jul 29, 2024
Dependency upgrade resulting from `cargo update`.

Co-authored-by: tautschnig <1144736+tautschnig@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
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.

3 participants