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 fuzzy matching in on_unimplemented #33694

Merged
merged 2 commits into from
May 19, 2016

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented May 17, 2016

@@ -523,8 +523,7 @@ impl<T> SliceExt for [T] {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[allow(unused_attributes)]
#[rustc_on_unimplemented = "a usize is required to index into a slice"]
#[rustc_on_unimplemented = "slice indexes must be usizes"]
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure the message is as clear as possible to the users that will be helped, maybe we can change to “slice index type must be usize”? I just think the “usizes” formulation will be confusing.

@nikomatsakis
Copy link
Contributor

cc @GuillaumeGomez

def_a == def_b,
_ => cat_a == cat_b
},
// infer and error are
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: incomplete sentence... "infer and error are fuzzy equal to all types", I guess?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: incomplete sentence... "infer and error are fuzzy equal to all types", I guess?

@nikomatsakis
Copy link
Contributor

Looks great!

r=me after nits and once we settle on a good wording for the error message :)

@arielb1
Copy link
Contributor Author

arielb1 commented May 18, 2016

<updated>

@@ -523,8 +523,7 @@ impl<T> SliceExt for [T] {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[allow(unused_attributes)]
#[rustc_on_unimplemented = "a usize is required to index into a slice"]
#[rustc_on_unimplemented = "slice indices are of type usize"]
Copy link
Contributor

@nikomatsakis nikomatsakis May 18, 2016

Choose a reason for hiding this comment

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

nit: usize

@arielb1
Copy link
Contributor Author

arielb1 commented May 18, 2016

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented May 18, 2016

📌 Commit b344c71 has been approved by nikomatsakis

@nikomatsakis
Copy link
Contributor

r=me modulo nit

@arielb1
Copy link
Contributor Author

arielb1 commented May 18, 2016

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented May 18, 2016

📌 Commit b9a201c has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented May 19, 2016

⌛ Testing commit b9a201c with merge d0ca0ca...

bors added a commit that referenced this pull request May 19, 2016
implement fuzzy matching in on_unimplemented

Fixes #31062

r? @nikomatsakis
@bors bors merged commit b9a201c into rust-lang:master May 19, 2016
@bluss bluss added the relnotes Marks issues that should be documented in the release notes of the next release. label May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants