Removal pass for anonymous parameters

Removes occurences of anonymous parameters from the
rustc codebase, as they are to be deprecated.

See issue #41686 and RFC 1685.
This commit is contained in:
est31 2017-05-02 05:55:20 +02:00
parent 4cb396c680
commit d290849a23
14 changed files with 45 additions and 41 deletions

View file

@ -503,7 +503,7 @@ impl<'a> Iterator for ListAttributesIter<'a> {
pub trait AttributesExt {
/// Finds an attribute as List and returns the list of attributes nested inside.
fn lists<'a>(&'a self, &'a str) -> ListAttributesIter<'a>;
fn lists<'a>(&'a self, name: &'a str) -> ListAttributesIter<'a>;
}
impl AttributesExt for [ast::Attribute] {
@ -518,7 +518,7 @@ impl AttributesExt for [ast::Attribute] {
pub trait NestedAttributesExt {
/// Returns whether the attribute list contains a specific `Word`
fn has_word(self, &str) -> bool;
fn has_word(self, word: &str) -> bool;
}
impl<I: IntoIterator<Item=ast::NestedMetaItem>> NestedAttributesExt for I {

View file

@ -89,7 +89,7 @@ impl<'a, 'tcx> DocContext<'a, 'tcx> {
}
pub trait DocAccessLevels {
fn is_doc_reachable(&self, DefId) -> bool;
fn is_doc_reachable(&self, did: DefId) -> bool;
}
impl DocAccessLevels for AccessLevels<DefId> {

View file

@ -114,7 +114,7 @@ pub enum Class {
pub trait Writer {
/// Called when we start processing a span of text that should be highlighted.
/// The `Class` argument specifies how it should be highlighted.
fn enter_span(&mut self, Class) -> io::Result<()>;
fn enter_span(&mut self, _: Class) -> io::Result<()>;
/// Called at the end of a span of highlighted text.
fn exit_span(&mut self) -> io::Result<()>;
@ -131,7 +131,11 @@ pub trait Writer {
/// ```
/// The latter can be thought of as a shorthand for the former, which is
/// more flexible.
fn string<T: Display>(&mut self, T, Class, Option<&TokenAndSpan>) -> io::Result<()>;
fn string<T: Display>(&mut self,
text: T,
klass: Class,
tas: Option<&TokenAndSpan>)
-> io::Result<()>;
}
// Implement `Writer` for anthing that can be written to, this just implements