Skip to content

Commit cf747fc

Browse files
committed
Auto merge of #42212 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 15 pull requests - Successful merges: #41980, #42071, #42120, #42134, #42141, #42142, #42149, #42150, #42159, #42177, #42186, #42191, #42195, #42198, #42211 - Failed merges:
2 parents 5b13bff + d429b49 commit cf747fc

File tree

279 files changed

+603
-643
lines changed

Some content is hidden

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

279 files changed

+603
-643
lines changed

src/Cargo.lock

-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/bootstrap.py

+21-18
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ def unpack(tarball, dst, verbose=False, match=None):
127127
shutil.move(tp, fp)
128128
shutil.rmtree(os.path.join(dst, fname))
129129

130-
def run(args, verbose=False, exception=False, cwd=None):
130+
def run(args, verbose=False, exception=False, cwd=None, env=None):
131131
if verbose:
132132
print("running: " + ' '.join(args))
133133
sys.stdout.flush()
134134
# Use Popen here instead of call() as it apparently allows powershell on
135135
# Windows to not lock up waiting for input presumably.
136-
ret = subprocess.Popen(args, cwd=cwd)
136+
ret = subprocess.Popen(args, cwd=cwd, env=env)
137137
code = ret.wait()
138138
if code != 0:
139139
err = "failed to run: " + ' '.join(args)
@@ -385,17 +385,15 @@ def build_bootstrap(self):
385385
raise Exception("no cargo executable found at `%s`" % self.cargo())
386386
args = [self.cargo(), "build", "--manifest-path",
387387
os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
388+
if self.verbose:
389+
args.append("--verbose")
390+
if self.verbose > 1:
391+
args.append("--verbose")
388392
if self.use_locked_deps:
389393
args.append("--locked")
390394
if self.use_vendored_sources:
391395
args.append("--frozen")
392-
self.run(args, env)
393-
394-
def run(self, args, env=None, cwd=None):
395-
proc = subprocess.Popen(args, env=env, cwd=cwd)
396-
ret = proc.wait()
397-
if ret != 0:
398-
sys.exit(ret)
396+
run(args, env=env, verbose=self.verbose)
399397

400398
def output(self, args, env=None, cwd=None):
401399
default_encoding = sys.getdefaultencoding()
@@ -567,7 +565,7 @@ def update_submodules(self):
567565
path = line[1:].split(' ')[1]
568566
submodules.append([path, line[0]])
569567

570-
self.run(["git", "submodule", "sync"], cwd=self.rust_root)
568+
run(["git", "submodule", "sync"], cwd=self.rust_root)
571569

572570
for submod in submodules:
573571
path, status = submod
@@ -580,15 +578,15 @@ def update_submodules(self):
580578
submod_path = os.path.join(self.rust_root, path)
581579

582580
if status == ' ':
583-
self.run(["git", "reset", "--hard"], cwd=submod_path)
584-
self.run(["git", "clean", "-fdx"], cwd=submod_path)
581+
run(["git", "reset", "--hard"], cwd=submod_path)
582+
run(["git", "clean", "-fdx"], cwd=submod_path)
585583
elif status == '+':
586-
self.run(["git", "submodule", "update", path], cwd=self.rust_root)
587-
self.run(["git", "reset", "--hard"], cwd=submod_path)
588-
self.run(["git", "clean", "-fdx"], cwd=submod_path)
584+
run(["git", "submodule", "update", path], cwd=self.rust_root)
585+
run(["git", "reset", "--hard"], cwd=submod_path)
586+
run(["git", "clean", "-fdx"], cwd=submod_path)
589587
elif status == '-':
590-
self.run(["git", "submodule", "init", path], cwd=self.rust_root)
591-
self.run(["git", "submodule", "update", path], cwd=self.rust_root)
588+
run(["git", "submodule", "init", path], cwd=self.rust_root)
589+
run(["git", "submodule", "update", path], cwd=self.rust_root)
592590
else:
593591
raise ValueError('unknown submodule status: ' + status)
594592

@@ -620,6 +618,11 @@ def bootstrap():
620618
except:
621619
pass
622620

621+
if '\nverbose = 2' in rb.config_toml:
622+
rb.verbose = 2
623+
elif '\nverbose = 1' in rb.config_toml:
624+
rb.verbose = 1
625+
623626
rb.use_vendored_sources = '\nvendor = true' in rb.config_toml or \
624627
'CFG_ENABLE_VENDOR' in rb.config_mk
625628

@@ -676,7 +679,7 @@ def bootstrap():
676679
env["BUILD"] = rb.build
677680
env["SRC"] = rb.rust_root
678681
env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
679-
rb.run(args, env)
682+
run(args, env=env, verbose=rb.verbose)
680683

681684
def main():
682685
start_time = time()

src/ci/init_repo.sh

+10
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ if [ ! -d "$cache_src_dir/.git" ]; then
6464
git clone https://github.com/rust-lang/rust.git $cache_src_dir"
6565
fi
6666
retry sh -c "cd $cache_src_dir && git reset --hard && git pull"
67+
(cd $cache_src_dir && git rm src/llvm)
6768
retry sh -c "cd $cache_src_dir && \
6869
git submodule deinit -f . && git submodule sync && git submodule update --init"
6970

@@ -76,6 +77,15 @@ touch "$cache_valid_file"
7677
# http://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository
7778
modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)"
7879
for module in $modules; do
80+
if [ "$module" = src/llvm ]; then
81+
commit="$(git ls-tree HEAD src/llvm | awk '{print $3}')"
82+
git rm src/llvm
83+
curl -sSL -O "https://github.com/rust-lang/llvm/archive/$commit.tar.gz"
84+
tar -C src/ -xf "$commit.tar.gz"
85+
rm "$commit.tar.gz"
86+
mv "src/llvm-$commit" src/llvm
87+
continue
88+
fi
7989
if [ ! -d "$cache_src_dir/$module" ]; then
8090
echo "WARNING: $module not found in pristine repo"
8191
retry sh -c "git submodule deinit -f $module && git submodule update --init $module"

src/libcollections/range.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,10 @@ impl<T> RangeArgument<T> for Range<T> {
106106
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
107107
impl<T> RangeArgument<T> for RangeInclusive<T> {
108108
fn start(&self) -> Bound<&T> {
109-
match *self {
110-
RangeInclusive::Empty{ ref at } => Included(at),
111-
RangeInclusive::NonEmpty { ref start, .. } => Included(start),
112-
}
109+
Included(&self.start)
113110
}
114111
fn end(&self) -> Bound<&T> {
115-
match *self {
116-
RangeInclusive::Empty{ ref at } => Excluded(at),
117-
RangeInclusive::NonEmpty { ref end, .. } => Included(end),
118-
}
112+
Included(&self.end)
119113
}
120114
}
121115

0 commit comments

Comments
 (0)