Skip to content

Commit d2b8c29

Browse files
committed
update to rust breaking change rust-lang/rust#19298
1 parent ea6b2c4 commit d2b8c29

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/lib/codegen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ impl EnumValue {
717717

718718
struct IndentWriter<'a> {
719719
// TODO: add mut
720-
writer: &'a Writer + 'a,
720+
writer: &'a (Writer + 'a),
721721
indent: String,
722722
msg: Option<&'a MessageInfo<'a>>,
723723
field: Option<&'a Field>,

src/lib/reflect.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ trait FieldAccessorGeneric {
143143
}
144144

145145
struct FieldAccessorGenericImpl<M> {
146-
accessor: &'static FieldAccessor<M> + 'static
146+
accessor: &'static (FieldAccessor<M> + 'static)
147147
}
148148

149149
impl<M : Message> FieldAccessorGenericImpl<M> {
150-
fn new(a: &'static FieldAccessor<M> + 'static) -> FieldAccessorGenericImpl<M> {
150+
fn new(a: &'static (FieldAccessor<M> + 'static)) -> FieldAccessorGenericImpl<M> {
151151
FieldAccessorGenericImpl {
152152
accessor: a
153153
}
@@ -258,7 +258,7 @@ pub struct FieldDescriptor {
258258
}
259259

260260
impl FieldDescriptor {
261-
fn new<M : 'static + Message>(a: &'static FieldAccessor<M> + 'static, proto: &'static FieldDescriptorProto)
261+
fn new<M : 'static + Message>(a: &'static (FieldAccessor<M> + 'static), proto: &'static FieldDescriptorProto)
262262
-> FieldDescriptor
263263
{
264264
assert_eq!(proto.get_name(), a.name());
@@ -425,7 +425,7 @@ impl MessageDescriptor {
425425

426426
pub fn new<M : 'static + Message>(
427427
rust_name: &'static str,
428-
fields: Vec<&'static FieldAccessor<M> + 'static>,
428+
fields: Vec<&'static (FieldAccessor<M> + 'static)>,
429429
file: &'static FileDescriptorProto
430430
) -> MessageDescriptor
431431
{

src/lib/stream.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub struct CodedInputStream<'a> {
8989
buffer: MaybeOwnedSlice<'a, u8>,
9090
buffer_size: u32,
9191
buffer_pos: u32,
92-
reader: Option<&'a mut Reader + 'a>,
92+
reader: Option<&'a mut (Reader + 'a)>,
9393
total_bytes_retired: u32,
9494
current_limit: u32,
9595
buffer_size_after_limit: u32,
@@ -625,7 +625,7 @@ pub trait WithCodedOutputStream {
625625
-> ProtobufResult<T>;
626626
}
627627

628-
impl<'a> WithCodedOutputStream for &'a mut Writer + 'a {
628+
impl<'a> WithCodedOutputStream for &'a mut (Writer + 'a) {
629629
fn with_coded_output_stream<T>(self, cb: |&mut CodedOutputStream| -> ProtobufResult<T>)
630630
-> ProtobufResult<T>
631631
{
@@ -661,7 +661,7 @@ pub trait WithCodedInputStream {
661661
fn with_coded_input_stream<T>(self, cb: |&mut CodedInputStream| -> T) -> T;
662662
}
663663

664-
impl<'a> WithCodedInputStream for &'a mut Reader + 'a {
664+
impl<'a> WithCodedInputStream for &'a mut (Reader + 'a) {
665665
fn with_coded_input_stream<T>(self, cb: |&mut CodedInputStream| -> T) -> T {
666666
let mut is = CodedInputStream::new(self);
667667
let r = cb(&mut is);
@@ -687,7 +687,7 @@ pub struct CodedOutputStream<'a> {
687687
buffer: Vec<u8>,
688688
// within buffer
689689
position: u32,
690-
writer: Option<&'a mut Writer + 'a>,
690+
writer: Option<&'a mut (Writer + 'a)>,
691691
}
692692

693693
impl<'a> CodedOutputStream<'a> {

0 commit comments

Comments
 (0)