Deny bare trait objects in in src/libsyntax
This commit is contained in:
@@ -62,10 +62,10 @@ pub struct State<'a> {
|
||||
literals: Peekable<vec::IntoIter<comments::Literal>>,
|
||||
cur_cmnt: usize,
|
||||
boxes: Vec<pp::Breaks>,
|
||||
ann: &'a (PpAnn+'a),
|
||||
ann: &'a (dyn PpAnn+'a),
|
||||
}
|
||||
|
||||
fn rust_printer<'a>(writer: Box<Write+'a>, ann: &'a PpAnn) -> State<'a> {
|
||||
fn rust_printer<'a>(writer: Box<dyn Write+'a>, ann: &'a dyn PpAnn) -> State<'a> {
|
||||
State {
|
||||
s: pp::mk_printer(writer, DEFAULT_COLUMNS),
|
||||
cm: None,
|
||||
@@ -88,9 +88,9 @@ pub fn print_crate<'a>(cm: &'a CodeMap,
|
||||
sess: &ParseSess,
|
||||
krate: &ast::Crate,
|
||||
filename: FileName,
|
||||
input: &mut Read,
|
||||
out: Box<Write+'a>,
|
||||
ann: &'a PpAnn,
|
||||
input: &mut dyn Read,
|
||||
out: Box<dyn Write+'a>,
|
||||
ann: &'a dyn PpAnn,
|
||||
is_expanded: bool) -> io::Result<()> {
|
||||
let mut s = State::new_from_input(cm, sess, filename, input, out, ann, is_expanded);
|
||||
|
||||
@@ -121,9 +121,9 @@ impl<'a> State<'a> {
|
||||
pub fn new_from_input(cm: &'a CodeMap,
|
||||
sess: &ParseSess,
|
||||
filename: FileName,
|
||||
input: &mut Read,
|
||||
out: Box<Write+'a>,
|
||||
ann: &'a PpAnn,
|
||||
input: &mut dyn Read,
|
||||
out: Box<dyn Write+'a>,
|
||||
ann: &'a dyn PpAnn,
|
||||
is_expanded: bool) -> State<'a> {
|
||||
let (cmnts, lits) = comments::gather_comments_and_literals(sess, filename, input);
|
||||
|
||||
@@ -139,8 +139,8 @@ impl<'a> State<'a> {
|
||||
}
|
||||
|
||||
pub fn new(cm: &'a CodeMap,
|
||||
out: Box<Write+'a>,
|
||||
ann: &'a PpAnn,
|
||||
out: Box<dyn Write+'a>,
|
||||
ann: &'a dyn PpAnn,
|
||||
comments: Option<Vec<comments::Comment>>,
|
||||
literals: Option<Vec<comments::Literal>>) -> State<'a> {
|
||||
State {
|
||||
|
||||
Reference in New Issue
Block a user