Skip to content

Commit d3ffad7

Browse files
committed
Auto merge of #31777 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31721, #31737, #31741, #31750, #31763, #31764, #31765, #31775 - Failed merges:
2 parents a212264 + 78f6431 commit d3ffad7

File tree

9 files changed

+47
-32
lines changed

9 files changed

+47
-32
lines changed

.mailmap

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Gareth Daniel Smith <[email protected]> Gareth Smith <garethdanielsmit
8282
8383
Graham Fawcett <[email protected]> Graham Fawcett <[email protected]>
8484
Graydon Hoare <[email protected]> Graydon Hoare <[email protected]>
85-
Guillaume Gomez <[email protected]>
85+
Guillaume Gomez <[email protected]> Guillaume Gomez <[email protected]>
8686
8787
8888
Herman J. Radtke III <[email protected]> Herman J. Radtke III <[email protected]>

src/liballoc_jemalloc/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ extern {}
4545
// explicitly request it), and on Android we explicitly request it as
4646
// unprefixing cause segfaults (mismatches in allocators).
4747
extern {
48-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
48+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
4949
link_name = "je_mallocx")]
5050
fn mallocx(size: size_t, flags: c_int) -> *mut c_void;
51-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
51+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5252
link_name = "je_rallocx")]
5353
fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void;
54-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
54+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5555
link_name = "je_xallocx")]
5656
fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t;
57-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
57+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5858
link_name = "je_sdallocx")]
5959
fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int);
60-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
60+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
6161
link_name = "je_nallocx")]
6262
fn nallocx(size: size_t, flags: c_int) -> size_t;
6363
}

src/librustc/front/check_attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl<'a, 'v> Visitor<'v> for CheckAttrVisitor<'a> {
101101
for attr in &item.attrs {
102102
self.check_attribute(attr, target);
103103
}
104+
visit::walk_item(self, item);
104105
}
105106
}
106107

src/librustc_privacy/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ let f = Bar::Foo{ a: 0, b: 0 }; // error: field `b` of struct `Bar::Foo`
205205
// is private
206206
```
207207
208-
To fix this error, please ensure that all the fields of the struct, or
209-
implement a function for easy instantiation. Examples:
208+
To fix this error, please ensure that all the fields of the struct are public,
209+
or implement a function for easy instantiation. Examples:
210210
211211
```
212212
mod Bar {

src/librustc_privacy/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> {
833833
NamedField(name) => format!("field `{}` of {} is private",
834834
name, struct_desc),
835835
UnnamedField(idx) => format!("field #{} of {} is private",
836-
idx + 1, struct_desc),
836+
idx, struct_desc),
837837
};
838838
span_err!(self.tcx.sess, span, E0451,
839839
"{}", &msg[..]);

src/libstd/env.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,13 @@ pub struct ArgsOs { inner: os_imp::Args }
528528
/// via the command line).
529529
///
530530
/// The first element is traditionally the path to the executable, but it can be
531-
/// set to arbitrary text, and it may not even exist, so this property should
531+
/// set to arbitrary text, and may not even exist. This means this property should
532532
/// not be relied upon for security purposes.
533533
///
534534
/// # Panics
535535
///
536536
/// The returned iterator will panic during iteration if any argument to the
537-
/// process is not valid unicode. If this is not desired it is recommended to
537+
/// process is not valid unicode. If this is not desired,
538538
/// use the `args_os` function instead.
539539
///
540540
/// # Examples
@@ -603,7 +603,7 @@ impl ExactSizeIterator for ArgsOs {
603603
/// Constants associated with the current target
604604
#[stable(feature = "env", since = "1.0.0")]
605605
pub mod consts {
606-
/// A string describing the architecture of the CPU that this is currently
606+
/// A string describing the architecture of the CPU that is currently
607607
/// in use.
608608
///
609609
/// Some possible values:

src/libstd/os/netbsd/raw.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ pub struct stat {
4646
#[stable(feature = "raw_ext", since = "1.1.0")]
4747
pub st_nlink: u32,
4848
#[stable(feature = "raw_ext", since = "1.1.0")]
49-
pub st_uid: u32,
49+
pub st_uid: uid_t,
5050
#[stable(feature = "raw_ext", since = "1.1.0")]
51-
pub st_gid: u32,
51+
pub st_gid: gid_t,
5252
#[stable(feature = "raw_ext", since = "1.1.0")]
5353
pub st_rdev: u64,
5454
#[stable(feature = "raw_ext", since = "1.1.0")]

src/test/compile-fail/issue-31769.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
fn main() {
12+
#[inline] struct Foo; //~ ERROR attribute should be applied to function
13+
#[repr(C)] fn foo() {} //~ ERROR attribute should be applied to struct or enum
14+
}

src/test/compile-fail/privacy5.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,25 @@ fn this_crate() {
6363
let c = a::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor
6464
let d = a::D(4);
6565

66-
let a::A(()) = a; //~ ERROR: field #1 of struct `a::A` is private
66+
let a::A(()) = a; //~ ERROR: field #0 of struct `a::A` is private
6767
let a::A(_) = a;
68-
match a { a::A(()) => {} } //~ ERROR: field #1 of struct `a::A` is private
68+
match a { a::A(()) => {} } //~ ERROR: field #0 of struct `a::A` is private
6969
match a { a::A(_) => {} }
7070

7171
let a::B(_) = b;
72-
let a::B(_b) = b; //~ ERROR: field #1 of struct `a::B` is private
72+
let a::B(_b) = b; //~ ERROR: field #0 of struct `a::B` is private
7373
match b { a::B(_) => {} }
74-
match b { a::B(_b) => {} } //~ ERROR: field #1 of struct `a::B` is private
75-
match b { a::B(1) => {} a::B(_) => {} } //~ ERROR: field #1 of struct `a::B` is private
74+
match b { a::B(_b) => {} } //~ ERROR: field #0 of struct `a::B` is private
75+
match b { a::B(1) => {} a::B(_) => {} } //~ ERROR: field #0 of struct `a::B` is private
7676

7777
let a::C(_, _) = c;
7878
let a::C(_a, _) = c;
79-
let a::C(_, _b) = c; //~ ERROR: field #2 of struct `a::C` is private
80-
let a::C(_a, _b) = c; //~ ERROR: field #2 of struct `a::C` is private
79+
let a::C(_, _b) = c; //~ ERROR: field #1 of struct `a::C` is private
80+
let a::C(_a, _b) = c; //~ ERROR: field #1 of struct `a::C` is private
8181
match c { a::C(_, _) => {} }
8282
match c { a::C(_a, _) => {} }
83-
match c { a::C(_, _b) => {} } //~ ERROR: field #2 of struct `a::C` is private
84-
match c { a::C(_a, _b) => {} } //~ ERROR: field #2 of struct `a::C` is private
83+
match c { a::C(_, _b) => {} } //~ ERROR: field #1 of struct `a::C` is private
84+
match c { a::C(_a, _b) => {} } //~ ERROR: field #1 of struct `a::C` is private
8585

8686
let a::D(_) = d;
8787
let a::D(_d) = d;
@@ -101,30 +101,30 @@ fn xcrate() {
101101
let c = other::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor
102102
let d = other::D(4);
103103

104-
let other::A(()) = a; //~ ERROR: field #1 of struct `other::A` is private
104+
let other::A(()) = a; //~ ERROR: field #0 of struct `other::A` is private
105105
let other::A(_) = a;
106106
match a { other::A(()) => {} }
107-
//~^ ERROR: field #1 of struct `other::A` is private
107+
//~^ ERROR: field #0 of struct `other::A` is private
108108
match a { other::A(_) => {} }
109109

110110
let other::B(_) = b;
111-
let other::B(_b) = b; //~ ERROR: field #1 of struct `other::B` is private
111+
let other::B(_b) = b; //~ ERROR: field #0 of struct `other::B` is private
112112
match b { other::B(_) => {} }
113113
match b { other::B(_b) => {} }
114-
//~^ ERROR: field #1 of struct `other::B` is private
114+
//~^ ERROR: field #0 of struct `other::B` is private
115115
match b { other::B(1) => {} other::B(_) => {} }
116-
//~^ ERROR: field #1 of struct `other::B` is private
116+
//~^ ERROR: field #0 of struct `other::B` is private
117117

118118
let other::C(_, _) = c;
119119
let other::C(_a, _) = c;
120-
let other::C(_, _b) = c; //~ ERROR: field #2 of struct `other::C` is private
121-
let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `other::C` is private
120+
let other::C(_, _b) = c; //~ ERROR: field #1 of struct `other::C` is private
121+
let other::C(_a, _b) = c; //~ ERROR: field #1 of struct `other::C` is private
122122
match c { other::C(_, _) => {} }
123123
match c { other::C(_a, _) => {} }
124124
match c { other::C(_, _b) => {} }
125-
//~^ ERROR: field #2 of struct `other::C` is private
125+
//~^ ERROR: field #1 of struct `other::C` is private
126126
match c { other::C(_a, _b) => {} }
127-
//~^ ERROR: field #2 of struct `other::C` is private
127+
//~^ ERROR: field #1 of struct `other::C` is private
128128

129129
let other::D(_) = d;
130130
let other::D(_d) = d;

0 commit comments

Comments
 (0)