Skip to content

Commit e152c38

Browse files
committed
Fix merge issues
2 parents 752a1a4 + f693d33 commit e152c38

File tree

424 files changed

+8009
-3980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

424 files changed

+8009
-3980
lines changed

.azure-pipelines/steps/run.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ steps:
3737
set -e
3838
brew update
3939
brew install xz
40-
brew install swig
40+
brew install swig@3
41+
brew link --force swig@3
4142
displayName: Install build dependencies (OSX)
4243
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['SCRIPT'],'./x.py dist'))
4344

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ install:
263263
if [[ "$SCRIPT" == "./x.py dist" ]]; then
264264
travis_retry brew update &&
265265
travis_retry brew install xz &&
266-
travis_retry brew install swig;
266+
travis_retry brew install swig@3 &&
267+
brew link --force swig@3;
267268
fi &&
268269
travis_retry curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin &&
269270
chmod +x /usr/local/bin/sccache &&

Cargo.lock

Lines changed: 353 additions & 202 deletions
Large diffs are not rendered by default.

src/bootstrap/job.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use std::env;
3333
use std::io;
3434
use std::mem;
35+
use std::ptr;
3536
use crate::Build;
3637

3738
type HANDLE = *mut u8;
@@ -118,8 +119,8 @@ pub unsafe fn setup(build: &mut Build) {
118119
SetErrorMode(mode & !SEM_NOGPFAULTERRORBOX);
119120

120121
// Create a new job object for us to use
121-
let job = CreateJobObjectW(0 as *mut _, 0 as *const _);
122-
assert!(job != 0 as *mut _, "{}", io::Error::last_os_error());
122+
let job = CreateJobObjectW(ptr::null_mut(), ptr::null());
123+
assert!(!job.is_null(), "{}", io::Error::last_os_error());
123124

124125
// Indicate that when all handles to the job object are gone that all
125126
// process in the object should be killed. Note that this includes our
@@ -166,8 +167,8 @@ pub unsafe fn setup(build: &mut Build) {
166167
};
167168

168169
let parent = OpenProcess(PROCESS_DUP_HANDLE, FALSE, pid.parse().unwrap());
169-
assert!(parent != 0 as *mut _, "{}", io::Error::last_os_error());
170-
let mut parent_handle = 0 as *mut _;
170+
assert!(!parent.is_null(), "{}", io::Error::last_os_error());
171+
let mut parent_handle = ptr::null_mut();
171172
let r = DuplicateHandle(GetCurrentProcess(), job,
172173
parent, &mut parent_handle,
173174
0, FALSE, DUPLICATE_SAME_ACCESS);

src/bootstrap/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> {
209209
let h = CreateFileW(path.as_ptr(),
210210
GENERIC_WRITE,
211211
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
212-
0 as *mut _,
212+
ptr::null_mut(),
213213
OPEN_EXISTING,
214214
FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
215215
ptr::null_mut());

src/ci/cpu-usage-over-time.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,8 @@
3030
# the second column is always zero.
3131
#
3232
# Once you've downloaded a file there's various ways to plot it and visualize
33-
# it. For command line usage you can use a script like so:
34-
#
35-
# set timefmt '%Y-%m-%dT%H:%M:%S'
36-
# set xdata time
37-
# set ylabel "Idle CPU %"
38-
# set xlabel "Time"
39-
# set datafile sep ','
40-
# set term png
41-
# set output "printme.png"
42-
# set grid
43-
# builder = "i686-apple"
44-
# plot "cpu-".builder.".csv" using 1:2 with lines title builder
45-
#
46-
# Executed as `gnuplot < ./foo.plot` it will generate a graph called
47-
# `printme.png` which you can then open up. If you know how to improve this
48-
# script or the viewing process that would be much appreciated :) (or even if
49-
# you know how to automate it!)
33+
# it. For command line usage you use the `src/etc/cpu-usage-over-time-plot.sh`
34+
# script in this repository.
5035

5136
import datetime
5237
import sys

src/doc/unstable-book/src/language-features/plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The advantages over a simple `fn(&str) -> u32` are:
132132
In addition to procedural macros, you can define new
133133
[`derive`](../../reference/attributes/derive.md)-like attributes and other kinds
134134
of extensions. See `Registry::register_syntax_extension` and the
135-
`SyntaxExtension` enum. For a more involved macro example, see
135+
`SyntaxExtension` struct. For a more involved macro example, see
136136
[`regex_macros`](https://github.com/rust-lang/regex/blob/master/regex_macros/src/lib.rs).
137137

138138

src/etc/cpu-usage-over-time-plot.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
# A small script to help visualizing CPU usage over time data collected on CI
4+
# using `gnuplot`.
5+
#
6+
# This script is expected to be called with two arguments. The first is the full
7+
# commit SHA of the build you're interested in, and the second is the name of
8+
# the builder. For example:
9+
#
10+
# ./src/etc/cpu-usage-over-time-plot.sh e699ea096fcc2fc9ce8e8bcf884e11496a31cc9f i686-mingw-1
11+
#
12+
# That will generate `$builder.png` in the current directory which you can open
13+
# up to see a hopefully pretty graph.
14+
#
15+
# Improvements to this script are greatly appreciated!
16+
17+
set -ex
18+
19+
bucket=rust-lang-ci-evalazure
20+
commit=$1
21+
builder=$2
22+
23+
curl -O https://$bucket.s3.amazonaws.com/rustc-builds/$commit/cpu-$builder.csv
24+
25+
gnuplot <<-EOF
26+
reset
27+
set timefmt '%Y-%m-%dT%H:%M:%S'
28+
set xdata time
29+
set ylabel "CPU Usage %"
30+
set xlabel "Time"
31+
set datafile sep ','
32+
set term png size 3000,1000
33+
set output "$builder.png"
34+
set grid
35+
36+
f(x) = mean_y
37+
fit f(x) 'cpu-$builder.csv' using 1:(100-\$2) via mean_y
38+
39+
set label 1 gprintf("Average = %g%%", mean_y) center font ",18"
40+
set label 1 at graph 0.50, 0.25
41+
set xtics rotate by 45 offset -2,-2.4 300
42+
set ytics 10
43+
set boxwidth 0.5
44+
45+
plot \\
46+
mean_y with lines linetype 1 linecolor rgb "#ff0000" title "average", \\
47+
"cpu-$builder.csv" using 1:(100-\$2) with points pointtype 7 pointsize 0.4 title "$builder", \\
48+
"" using 1:(100-\$2) smooth bezier linewidth 3 title "bezier"
49+
EOF

src/etc/rust-lldb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ category_definition="type summary add --no-value --python-function lldb_rust_for
3131
category_enable="type category enable Rust"
3232

3333
# Call LLDB with the commands added to the argument list
34-
exec "$lldb" --one-line-before-file="$script_import" \
35-
--one-line-before-file="$category_definition" \
36-
--one-line-before-file="$category_enable" \
34+
exec "$lldb" --one-line-before-file "$script_import" \
35+
--one-line-before-file "$category_definition" \
36+
--one-line-before-file "$category_enable" \
3737
"$@"

src/liballoc/rc.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,18 +1515,18 @@ impl<T: ?Sized> Weak<T> {
15151515
///
15161516
/// ```
15171517
/// #![feature(weak_ptr_eq)]
1518-
/// use std::rc::{Rc, Weak};
1518+
/// use std::rc::Rc;
15191519
///
15201520
/// let first_rc = Rc::new(5);
15211521
/// let first = Rc::downgrade(&first_rc);
15221522
/// let second = Rc::downgrade(&first_rc);
15231523
///
1524-
/// assert!(Weak::ptr_eq(&first, &second));
1524+
/// assert!(first.ptr_eq(&second));
15251525
///
15261526
/// let third_rc = Rc::new(5);
15271527
/// let third = Rc::downgrade(&third_rc);
15281528
///
1529-
/// assert!(!Weak::ptr_eq(&first, &third));
1529+
/// assert!(!first.ptr_eq(&third));
15301530
/// ```
15311531
///
15321532
/// Comparing `Weak::new`.
@@ -1537,16 +1537,16 @@ impl<T: ?Sized> Weak<T> {
15371537
///
15381538
/// let first = Weak::new();
15391539
/// let second = Weak::new();
1540-
/// assert!(Weak::ptr_eq(&first, &second));
1540+
/// assert!(first.ptr_eq(&second));
15411541
///
15421542
/// let third_rc = Rc::new(());
15431543
/// let third = Rc::downgrade(&third_rc);
1544-
/// assert!(!Weak::ptr_eq(&first, &third));
1544+
/// assert!(!first.ptr_eq(&third));
15451545
/// ```
15461546
#[inline]
15471547
#[unstable(feature = "weak_ptr_eq", issue = "55981")]
1548-
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
1549-
this.ptr.as_ptr() == other.ptr.as_ptr()
1548+
pub fn ptr_eq(&self, other: &Self) -> bool {
1549+
self.ptr.as_ptr() == other.ptr.as_ptr()
15501550
}
15511551
}
15521552

0 commit comments

Comments
 (0)