File tree 3 files changed +19
-3
lines changed
compiler/rustc_session/src
3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -833,6 +833,13 @@ impl Passes {
833
833
Passes :: All => false ,
834
834
}
835
835
}
836
+
837
+ pub fn extend ( & mut self , passes : impl IntoIterator < Item = String > ) {
838
+ match * self {
839
+ Passes :: Some ( ref mut v) => v. extend ( passes) ,
840
+ Passes :: All => { }
841
+ }
842
+ }
836
843
}
837
844
838
845
pub const fn default_lib_output ( ) -> CrateType {
Original file line number Diff line number Diff line change @@ -567,7 +567,7 @@ mod parse {
567
567
v => {
568
568
let mut passes = vec ! [ ] ;
569
569
if parse_list ( & mut passes, v) {
570
- * slot = Passes :: Some ( passes) ;
570
+ slot. extend ( passes) ;
571
571
true
572
572
} else {
573
573
false
Original file line number Diff line number Diff line change 1
1
// build-pass
2
2
// ignore-pass
3
3
// no-system-llvm
4
- // revisions: all inline
5
- // compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2
4
+ // revisions: all inline merge1 merge2
5
+ // compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2
6
+ //
7
+ // Check that remarks can be enabled individually or with "all":
8
+ //
6
9
// [all] compile-flags: -Cremark=all
7
10
// [inline] compile-flags: -Cremark=inline
11
+ //
12
+ // Check that values of -Cremark flag are accumulated:
13
+ //
14
+ // [merge1] compile-flags: -Cremark=all -Cremark=giraffe
15
+ // [merge2] compile-flags: -Cremark=inline -Cremark=giraffe
16
+ //
8
17
// error-pattern: inline: f not inlined into g
9
18
// dont-check-compiler-stderr
10
19
You can’t perform that action at this time.
0 commit comments