Skip to content

Commit 7c66a89

Browse files
committed
Auto merge of #32351 - eddyb:rollup, r=eddyb
Rollup of 14 pull requests - Successful merges: #32265, #32269, #32271, #32288, #32308, #32316, #32319, #32321, #32327, #32329, #32332, #32337, #32342, #32347 - Failed merges:
2 parents b854149 + 5bf1e58 commit 7c66a89

File tree

19 files changed

+100
-34
lines changed

19 files changed

+100
-34
lines changed

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Compatibility Notes
116116
that were not intended. In this release, [defaulted type parameters
117117
appearing outside of type definitions will generate a
118118
warning][1.7d], which will become an error in future releases.
119-
* [Parsing "." as a float results in an error instead of
120-
0][1.7p]. That is, `".".parse::<f32>()` returns `Err`, not `Ok(0)`.
119+
* [Parsing "." as a float results in an error instead of 0][1.7p].
120+
That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
121121
* [Borrows of closure parameters may not outlive the closure][1.7bc].
122122

123123
[1.7a]: https://github.com/rust-lang/rust/pull/30928

mk/cfg/i586-unknown-linux-gnu.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
77
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
88
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12-
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS) -march=pentium
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS) -march=pentium
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS) -march=pentium
1313
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
1414
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
1515
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=

src/bootstrap/build/native.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ pub fn compiler_rt(build: &Build, target: &str) {
114114
let arch = target.split('-').next().unwrap();
115115
let mode = if build.config.rust_optimize {"Release"} else {"Debug"};
116116
let (dir, build_target, libname) = if target.contains("linux") ||
117-
target.contains("freebsd") {
117+
target.contains("freebsd") ||
118+
target.contains("netbsd") {
118119
let os = if target.contains("android") {"-android"} else {""};
119120
let arch = if arch.starts_with("arm") && target.contains("eabihf") {
120121
"armhf"

src/compiletest/runtest.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,10 @@ fn check_expected_errors(revision: Option<&str>,
10251025
expected.replace(r"\", "/")
10261026
}).collect::<Vec<String>>();
10271027

1028+
// If the testcase being checked contains at least one expected "help"
1029+
// message, then we'll ensure that all "help" messages are expected.
1030+
// Otherwise, all "help" messages reported by the compiler will be ignored.
1031+
// This logic also applies to "note" messages.
10281032
let (expect_help, expect_note) =
10291033
expected_errors.iter()
10301034
.fold((false, false),

src/doc/book/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ unofficial locations.
9393
| `armv7-apple-ios` || | | ARM iOS |
9494
| `armv7s-apple-ios` || | | ARM iOS |
9595
| `aarch64-apple-ios` || | | ARM64 iOS |
96-
| `i686-unknown-freebsd` ||| | 32-bit FreeBSD |
97-
| `x86_64-unknown-freebsd` ||| | 64-bit FreeBSD |
96+
| `i686-unknown-freebsd` ||| | 32-bit FreeBSD |
97+
| `x86_64-unknown-freebsd` ||| | 64-bit FreeBSD |
9898
| `x86_64-unknown-openbsd` ||| | 64-bit OpenBSD |
9999
| `x86_64-unknown-netbsd` ||| | 64-bit NetBSD |
100100
| `x86_64-unknown-bitrig` ||| | 64-bit Bitrig |

src/doc/book/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ returned by `parse()`, this is an `enum` like `Ordering`, but in this case,
912912
each variant has some data associated with it: `Ok` is a success, and `Err` is a
913913
failure. Each contains more information: the successfully parsed integer, or an
914914
error type. In this case, we `match` on `Ok(num)`, which sets the name `num` to
915-
the unwrapped `Ok` value (ythe integer), and then we return it on the
915+
the unwrapped `Ok` value (the integer), and then we return it on the
916916
right-hand side. In the `Err` case, we don’t care what kind of error it is, so
917917
we just use the catch all `_` instead of a name. This catches everything that
918918
isn't `Ok`, and `continue` lets us move to the next iteration of the loop; in

src/doc/book/references-and-borrowing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ both at the same time:
163163
* exactly one mutable reference (`&mut T`).
164164

165165

166-
You may notice that this is very similar, though not exactly the same as,
167-
to the definition of a data race:
166+
You may notice that this is very similar to, though not exactly the same as,
167+
the definition of a data race:
168168

169169
> There is a ‘data race’ when two or more pointers access the same memory
170170
> location at the same time, where at least one of them is writing, and the

src/doc/book/variable-bindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ function, rather than leaving it off. Otherwise, you’ll get an error.
1818

1919
In many languages, a variable binding would be called a *variable*, but Rust’s
2020
variable bindings have a few tricks up their sleeves. For example the
21-
left-hand side of a `let` expression is a ‘[pattern][pattern]’, not a
21+
left-hand side of a `let` statement is a ‘[pattern][pattern]’, not a
2222
variable name. This means we can do things like:
2323

2424
```rust
2525
let (x, y) = (1, 2);
2626
```
2727

28-
After this expression is evaluated, `x` will be one, and `y` will be two.
28+
After this statement is evaluated, `x` will be one, and `y` will be two.
2929
Patterns are really powerful, and have [their own section][pattern] in the
3030
book. We don’t need those features for now, so we’ll keep this in the back
3131
of our minds as we go forward.

src/librustc/middle/liveness.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ use middle::pat_util;
115115
use middle::ty::{self, TyCtxt, ParameterEnvironment};
116116
use middle::traits::{self, ProjectionMode};
117117
use middle::infer;
118+
use middle::subst::Subst;
118119
use lint;
119120
use util::nodemap::NodeMap;
120121

@@ -1491,14 +1492,15 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
14911492
if self.live_on_entry(entry_ln, self.s.no_ret_var).is_some() => {
14921493

14931494
let param_env = ParameterEnvironment::for_item(&self.ir.tcx, id);
1495+
let t_ret_subst = t_ret.subst(&self.ir.tcx, &param_env.free_substs);
14941496
let infcx = infer::new_infer_ctxt(&self.ir.tcx,
14951497
&self.ir.tcx.tables,
14961498
Some(param_env),
14971499
ProjectionMode::Any);
14981500
let cause = traits::ObligationCause::dummy();
14991501
let norm = traits::fully_normalize(&infcx,
15001502
cause,
1501-
&t_ret);
1503+
&t_ret_subst);
15021504

15031505
if norm.unwrap().is_nil() {
15041506
// for nil return types, it is ok to not return a value expl.

src/librustc_trans/trans/intrinsic.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -589,15 +589,20 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
589589
},
590590
(_, "volatile_store") => {
591591
let tp_ty = *substs.types.get(FnSpace, 0);
592-
let val = if fn_ty.args[1].is_indirect() {
593-
Load(bcx, llargs[1])
592+
if type_is_fat_ptr(bcx.tcx(), tp_ty) {
593+
VolatileStore(bcx, llargs[1], expr::get_dataptr(bcx, llargs[0]));
594+
VolatileStore(bcx, llargs[2], expr::get_meta(bcx, llargs[0]));
594595
} else {
595-
from_immediate(bcx, llargs[1])
596-
};
597-
let ptr = PointerCast(bcx, llargs[0], val_ty(val).ptr_to());
598-
let store = VolatileStore(bcx, val, ptr);
599-
unsafe {
600-
llvm::LLVMSetAlignment(store, type_of::align_of(ccx, tp_ty));
596+
let val = if fn_ty.args[1].is_indirect() {
597+
Load(bcx, llargs[1])
598+
} else {
599+
from_immediate(bcx, llargs[1])
600+
};
601+
let ptr = PointerCast(bcx, llargs[0], val_ty(val).ptr_to());
602+
let store = VolatileStore(bcx, val, ptr);
603+
unsafe {
604+
llvm::LLVMSetAlignment(store, type_of::align_of(ccx, tp_ty));
605+
}
601606
}
602607
C_nil(ccx)
603608
},

0 commit comments

Comments
 (0)