From d336e593cc07139468c8f6f12b929e80ae365159 Mon Sep 17 00:00:00 2001 From: Tianjiao Huang <18585305+gitletH@users.noreply.github.com> Date: Sun, 19 Jan 2020 12:16:29 -0800 Subject: [PATCH 1/7] Fix invalid link to C++ Exception Handling ABI documentation --- src/libpanic_unwind/gcc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs index 6e04317d491fc..591ff9d7fdcaa 100644 --- a/src/libpanic_unwind/gcc.rs +++ b/src/libpanic_unwind/gcc.rs @@ -4,7 +4,7 @@ //! "Exception Handling in LLVM" (llvm.org/docs/ExceptionHandling.html) and //! documents linked from it. //! These are also good reads: -//! http://mentorembedded.github.io/cxx-abi/abi-eh.html +//! https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html //! http://monoinfinito.wordpress.com/series/exception-handling-in-c/ //! http://www.airs.com/blog/index.php?s=exception+frames //! From 5c73d21eaa48b7c94bedcc5352fcbc7d749ed48b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Thu, 23 Jan 2020 00:00:00 +0000 Subject: [PATCH 2/7] Use check-pass mode for nll tests --- .../closure-requirements/propagate-despite-same-free-region.rs | 2 +- src/test/ui/nll/constant.rs | 2 +- src/test/ui/nll/drop-may-dangle.rs | 2 +- src/test/ui/nll/extra-unused-mut.rs | 2 +- src/test/ui/nll/generator-distinct-lifetime.rs | 2 +- src/test/ui/nll/maybe-initialized-drop-uninitialized.rs | 2 +- src/test/ui/nll/projection-return.rs | 2 +- src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs | 2 +- src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs | 2 +- src/test/ui/nll/ty-outlives/projection-body.rs | 2 +- .../projection-one-region-trait-bound-static-closure.rs | 2 +- src/test/ui/nll/ty-outlives/projection-where-clause-env.rs | 2 +- src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs | 2 +- src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs | 2 +- src/test/ui/nll/user-annotations/downcast-infer.rs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs index 1df7c6114eeae..ac182be155607 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs @@ -4,7 +4,7 @@ // regions is erased. // compile-flags:-Zborrowck=mir -Zverbose -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![feature(rustc_attrs)] diff --git a/src/test/ui/nll/constant.rs b/src/test/ui/nll/constant.rs index b1ea2c906da88..039b6aaaf0a70 100644 --- a/src/test/ui/nll/constant.rs +++ b/src/test/ui/nll/constant.rs @@ -2,7 +2,7 @@ // arbitrary types without ICEs. // compile-flags:-Zborrowck=mir -// build-pass (FIXME(62277): could be check-pass?) +// check-pass const HI: &str = "hi"; diff --git a/src/test/ui/nll/drop-may-dangle.rs b/src/test/ui/nll/drop-may-dangle.rs index 0f3d27d066560..1897589bd5885 100644 --- a/src/test/ui/nll/drop-may-dangle.rs +++ b/src/test/ui/nll/drop-may-dangle.rs @@ -3,7 +3,7 @@ // including) the call to `use_x`. The `else` branch is not included. // compile-flags:-Zborrowck=mir -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![allow(warnings)] #![feature(dropck_eyepatch)] diff --git a/src/test/ui/nll/extra-unused-mut.rs b/src/test/ui/nll/extra-unused-mut.rs index e9c8df46213b5..db056a2285509 100644 --- a/src/test/ui/nll/extra-unused-mut.rs +++ b/src/test/ui/nll/extra-unused-mut.rs @@ -1,6 +1,6 @@ // extra unused mut lint tests for #51918 -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![feature(generators, nll)] #![deny(unused_mut)] diff --git a/src/test/ui/nll/generator-distinct-lifetime.rs b/src/test/ui/nll/generator-distinct-lifetime.rs index 1bd39db35d9aa..3102562cd0ab2 100644 --- a/src/test/ui/nll/generator-distinct-lifetime.rs +++ b/src/test/ui/nll/generator-distinct-lifetime.rs @@ -6,7 +6,7 @@ // over a yield -- because the data that is borrowed (`*x`) is not // stored on the stack. -// build-pass (FIXME(62277): could be check-pass?) +// check-pass fn foo(x: &mut u32) { move || { diff --git a/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs b/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs index 72212e9e70c0f..e81479495c4d7 100644 --- a/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs +++ b/src/test/ui/nll/maybe-initialized-drop-uninitialized.rs @@ -1,5 +1,5 @@ // compile-flags: -Zborrowck=mir -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![allow(warnings)] diff --git a/src/test/ui/nll/projection-return.rs b/src/test/ui/nll/projection-return.rs index 5c340434691f1..017f53d1457d8 100644 --- a/src/test/ui/nll/projection-return.rs +++ b/src/test/ui/nll/projection-return.rs @@ -1,5 +1,5 @@ // compile-flags:-Zborrowck=mir -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![feature(rustc_attrs)] diff --git a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs b/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs index 1bbc896c270a1..527cca133956c 100644 --- a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs +++ b/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs @@ -6,7 +6,7 @@ // another -- effectively, the single lifetime `'a` is just inferred // to be the intersection of the two distinct lifetimes. // -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // compile-flags:-Zno-leak-check #![feature(nll)] diff --git a/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs b/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs index 4e8599b2e3fbe..3a46188d11911 100644 --- a/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs +++ b/src/test/ui/nll/relate_tys/hr-fn-aba-as-aaa.rs @@ -2,7 +2,7 @@ // function returning always its first argument can be upcast to one // that returns either first or second argument. // -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // compile-flags:-Zno-leak-check #![feature(nll)] diff --git a/src/test/ui/nll/ty-outlives/projection-body.rs b/src/test/ui/nll/ty-outlives/projection-body.rs index 148120d848bc0..b03a539ebdbe9 100644 --- a/src/test/ui/nll/ty-outlives/projection-body.rs +++ b/src/test/ui/nll/ty-outlives/projection-body.rs @@ -1,7 +1,7 @@ // Test that when we infer the lifetime to a subset of the fn body, it // works out. // -// build-pass (FIXME(62277): could be check-pass?) +// check-pass trait MyTrait<'a> { type Output; diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs index b9c9611e38c2c..be1b653c384b7 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs @@ -3,7 +3,7 @@ // we don't even propagate constraints from the closures to the callers. // compile-flags:-Zborrowck=mir -Zverbose -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs index 4613dd29ef8f0..a411162325dc4 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env.rs @@ -4,7 +4,7 @@ // // Regression test for #53121. // -// build-pass (FIXME(62277): could be check-pass?) +// check-pass trait MyTrait<'a> { type Output; diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs index 89328c2ef1b33..8d0c10a639ee5 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-trait.rs @@ -4,7 +4,7 @@ // MyTrait<'a>>::Output: 'a` outlives `'a` (because the trait says // so). // -// build-pass (FIXME(62277): could be check-pass?) +// check-pass trait MyTrait<'a> { type Output: 'a; diff --git a/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs b/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs index a68c3cf12fd71..6547ae3981773 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs +++ b/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs @@ -1,5 +1,5 @@ // compile-flags:-Zborrowck=mir -Zverbose -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // Test that we assume that universal types like `T` outlive the // function body. diff --git a/src/test/ui/nll/user-annotations/downcast-infer.rs b/src/test/ui/nll/user-annotations/downcast-infer.rs index 3efea7136307c..b27429f4d190f 100644 --- a/src/test/ui/nll/user-annotations/downcast-infer.rs +++ b/src/test/ui/nll/user-annotations/downcast-infer.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // Check that we don't try to downcast `_` when type-checking the annotation. fn main() { From d915c016c986d3060d6275f472b8a6e4c22b56ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Thu, 23 Jan 2020 00:00:00 +0000 Subject: [PATCH 3/7] Use check-pass mode for lint tests --- src/test/ui/lint/command-line-lint-group-allow.rs | 2 +- src/test/ui/lint/dead-code/tuple-struct-field.rs | 2 +- src/test/ui/lint/inclusive-range-pattern-syntax.fixed | 2 +- src/test/ui/lint/inclusive-range-pattern-syntax.rs | 2 +- src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs | 2 +- src/test/ui/lint/lint-non-camel-case-variant.rs | 2 +- .../ui/lint/lint-non-camel-case-with-trailing-underscores.rs | 2 +- src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs | 2 +- src/test/ui/lint/lint-nonstandard-style-unicode.rs | 2 +- src/test/ui/lint/lint-output-format-2.rs | 2 +- src/test/ui/lint/lint-stability-deprecated.rs | 2 +- src/test/ui/lint/lints-in-foreign-macros.rs | 2 +- src/test/ui/lint/reasons.rs | 2 +- src/test/ui/lint/type-overflow.rs | 2 +- src/test/ui/lint/unused_labels.rs | 2 +- src/test/ui/lint/use-redundant.rs | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/test/ui/lint/command-line-lint-group-allow.rs b/src/test/ui/lint/command-line-lint-group-allow.rs index f26e157bc706e..21c0df0288fa0 100644 --- a/src/test/ui/lint/command-line-lint-group-allow.rs +++ b/src/test/ui/lint/command-line-lint-group-allow.rs @@ -1,5 +1,5 @@ // compile-flags: -A bad-style -// build-pass (FIXME(62277): could be check-pass?) +// check-pass fn main() { let _InappropriateCamelCasing = true; diff --git a/src/test/ui/lint/dead-code/tuple-struct-field.rs b/src/test/ui/lint/dead-code/tuple-struct-field.rs index 92a67950986b0..c8fd32c64d6db 100644 --- a/src/test/ui/lint/dead-code/tuple-struct-field.rs +++ b/src/test/ui/lint/dead-code/tuple-struct-field.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![deny(dead_code)] diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.fixed b/src/test/ui/lint/inclusive-range-pattern-syntax.fixed index 9fce66a0a83cc..d6e5033a0c4c2 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.fixed +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.fixed @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/src/test/ui/lint/inclusive-range-pattern-syntax.rs b/src/test/ui/lint/inclusive-range-pattern-syntax.rs index f886e778b5938..773eea14fd790 100644 --- a/src/test/ui/lint/inclusive-range-pattern-syntax.rs +++ b/src/test/ui/lint/inclusive-range-pattern-syntax.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // run-rustfix #![warn(ellipsis_inclusive_range_patterns)] diff --git a/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs b/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs index 95da4efa59041..d085db43aa94a 100644 --- a/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs +++ b/src/test/ui/lint/lint-lowercase-static-const-pattern-rename.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // Issue #7526: lowercase static constants in patterns look like bindings // This is similar to lint-lowercase-static-const-pattern.rs, except it diff --git a/src/test/ui/lint/lint-non-camel-case-variant.rs b/src/test/ui/lint/lint-non-camel-case-variant.rs index 434e24c1d278c..2b1a52f25be87 100644 --- a/src/test/ui/lint/lint-non-camel-case-variant.rs +++ b/src/test/ui/lint/lint-non-camel-case-variant.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![deny(non_camel_case_types)] diff --git a/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs b/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs index d025ee948546a..b832e4bcd6223 100644 --- a/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs +++ b/src/test/ui/lint/lint-non-camel-case-with-trailing-underscores.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![allow(dead_code)] // This is ok because we often use the trailing underscore to mean 'prime' diff --git a/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs b/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs index 5bec82ce1a6f5..710eebe4b6525 100644 --- a/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs +++ b/src/test/ui/lint/lint-non-snake-case-no-lowercase-equivalent.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![allow(dead_code)] // pretty-expanded FIXME #23616 diff --git a/src/test/ui/lint/lint-nonstandard-style-unicode.rs b/src/test/ui/lint/lint-nonstandard-style-unicode.rs index 40f0a676381b4..9f16cb20fb32c 100644 --- a/src/test/ui/lint/lint-nonstandard-style-unicode.rs +++ b/src/test/ui/lint/lint-nonstandard-style-unicode.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![allow(dead_code)] diff --git a/src/test/ui/lint/lint-output-format-2.rs b/src/test/ui/lint/lint-output-format-2.rs index 32a41179965f3..521472d99b17d 100644 --- a/src/test/ui/lint/lint-output-format-2.rs +++ b/src/test/ui/lint/lint-output-format-2.rs @@ -1,7 +1,7 @@ // aux-build:lint_output_format.rs #![feature(unstable_test_feature)] -// build-pass (FIXME(62277): could be check-pass?) +// check-pass extern crate lint_output_format; use lint_output_format::{foo, bar}; diff --git a/src/test/ui/lint/lint-stability-deprecated.rs b/src/test/ui/lint/lint-stability-deprecated.rs index 0bac9bb3d99cd..4b407a29f64b3 100644 --- a/src/test/ui/lint/lint-stability-deprecated.rs +++ b/src/test/ui/lint/lint-stability-deprecated.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass // aux-build:lint_stability.rs // aux-build:inherited_stability.rs // aux-build:stability_cfg1.rs diff --git a/src/test/ui/lint/lints-in-foreign-macros.rs b/src/test/ui/lint/lints-in-foreign-macros.rs index e381c81453b10..c96b8f1a5cf4a 100644 --- a/src/test/ui/lint/lints-in-foreign-macros.rs +++ b/src/test/ui/lint/lints-in-foreign-macros.rs @@ -1,5 +1,5 @@ // aux-build:lints-in-foreign-macros.rs -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![warn(unused_imports)] //~ missing documentation for crate [missing_docs] #![warn(missing_docs)] diff --git a/src/test/ui/lint/reasons.rs b/src/test/ui/lint/reasons.rs index fa9f012c9262c..4722e85673c2b 100644 --- a/src/test/ui/lint/reasons.rs +++ b/src/test/ui/lint/reasons.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![feature(lint_reasons)] diff --git a/src/test/ui/lint/type-overflow.rs b/src/test/ui/lint/type-overflow.rs index 79ffc82d32963..e40321e56bf15 100644 --- a/src/test/ui/lint/type-overflow.rs +++ b/src/test/ui/lint/type-overflow.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![warn(overflowing_literals)] fn main() { diff --git a/src/test/ui/lint/unused_labels.rs b/src/test/ui/lint/unused_labels.rs index d234a2fb1a02c..8a3568f65f63e 100644 --- a/src/test/ui/lint/unused_labels.rs +++ b/src/test/ui/lint/unused_labels.rs @@ -2,7 +2,7 @@ // should also deal with the edge cases where a label is shadowed, // within nested loops -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![feature(label_break_value)] #![warn(unused_labels)] diff --git a/src/test/ui/lint/use-redundant.rs b/src/test/ui/lint/use-redundant.rs index 3b00424d2f3fa..53315dcf638ae 100644 --- a/src/test/ui/lint/use-redundant.rs +++ b/src/test/ui/lint/use-redundant.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +// check-pass #![warn(unused_imports)] use crate::foo::Bar; From 2fd6c4a18a475a0474c035283e2c01480cbbc6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Fri, 24 Jan 2020 00:00:00 +0000 Subject: [PATCH 4/7] Remove unused ignore-license directives The tidy check was removed in rust-lang/rust#53617 --- src/libstd/sys/cloudabi/abi/bitflags.rs | 3 --- src/libstd/sys/cloudabi/abi/cloudabi.rs | 1 - src/test/pretty/top-level-doc-comments.rs | 5 ----- src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c | 1 - src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c | 2 -- src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c | 1 - src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c | 1 - src/test/run-make-fulldeps/c-static-dylib/cfoo.c | 1 - src/test/run-make-fulldeps/c-static-rlib/cfoo.c | 1 - .../run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp | 1 - src/test/run-make-fulldeps/extern-fn-generic/test.c | 1 - src/test/run-make-fulldeps/extern-fn-mangle/test.c | 1 - .../run-make-fulldeps/extern-fn-with-extern-types/ctest.c | 1 - .../run-make-fulldeps/extern-fn-with-packed-struct/test.c | 1 - src/test/run-make-fulldeps/extern-fn-with-union/ctest.c | 1 - src/test/run-make-fulldeps/glibc-staticlib-args/program.c | 1 - src/test/run-make-fulldeps/interdependent-c-libraries/bar.c | 1 - src/test/run-make-fulldeps/interdependent-c-libraries/foo.c | 1 - src/test/run-make-fulldeps/issue-25581/test.c | 1 - src/test/run-make-fulldeps/link-path-order/correct.c | 1 - src/test/run-make-fulldeps/link-path-order/wrong.c | 1 - src/test/run-make-fulldeps/linkage-attr-on-static/foo.c | 1 - src/test/run-make-fulldeps/lto-smoke-c/bar.c | 1 - src/test/run-make-fulldeps/manual-link/bar.c | 1 - src/test/run-make-fulldeps/manual-link/foo.c | 1 - .../run-make-fulldeps/sanitizer-staticlib-link/program.c | 1 - src/test/ui/attr-shebang.rs | 1 - .../ui/lexer-crlf-line-endings-string-literal-doc-comment.rs | 5 +---- 28 files changed, 1 insertion(+), 38 deletions(-) diff --git a/src/libstd/sys/cloudabi/abi/bitflags.rs b/src/libstd/sys/cloudabi/abi/bitflags.rs index 306936213ed11..2383277ad7284 100644 --- a/src/libstd/sys/cloudabi/abi/bitflags.rs +++ b/src/libstd/sys/cloudabi/abi/bitflags.rs @@ -21,9 +21,6 @@ // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. -// Appease Rust's tidy. -// ignore-license - #[cfg(feature = "bitflags")] use bitflags::bitflags; diff --git a/src/libstd/sys/cloudabi/abi/cloudabi.rs b/src/libstd/sys/cloudabi/abi/cloudabi.rs index d113a7b3d60d4..b02faf1830c53 100644 --- a/src/libstd/sys/cloudabi/abi/cloudabi.rs +++ b/src/libstd/sys/cloudabi/abi/cloudabi.rs @@ -26,7 +26,6 @@ // Source: https://github.com/NuxiNL/cloudabi // Appease Rust's tidy. -// ignore-license // ignore-tidy-linelength //! **PLEASE NOTE: This entire crate including this diff --git a/src/test/pretty/top-level-doc-comments.rs b/src/test/pretty/top-level-doc-comments.rs index 16f95d334cbcf..b97927124c30f 100644 --- a/src/test/pretty/top-level-doc-comments.rs +++ b/src/test/pretty/top-level-doc-comments.rs @@ -1,11 +1,6 @@ /// Some doc comment. struct X; -// ignore-license - -// http://rust-lang.org/COPYRIGHT. -// - // pp-exact // Test that rust can properly pretty print a doc comment if it's the first line in a file. some diff --git a/src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c b/src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c index a975549354123..fea490cf9b45f 100644 --- a/src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c +++ b/src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c @@ -1,4 +1,3 @@ -// ignore-license #ifdef _WIN32 __declspec(dllexport) #endif diff --git a/src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c b/src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c index b2849326a7588..fea490cf9b45f 100644 --- a/src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c +++ b/src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c @@ -1,5 +1,3 @@ -// ignore-license - #ifdef _WIN32 __declspec(dllexport) #endif diff --git a/src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c b/src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c index 5729d411c5bcd..bb4036b06e13b 100644 --- a/src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c +++ b/src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c @@ -1,4 +1,3 @@ -// ignore-license void foo(); int main() { diff --git a/src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c index 5729d411c5bcd..bb4036b06e13b 100644 --- a/src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c +++ b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c @@ -1,4 +1,3 @@ -// ignore-license void foo(); int main() { diff --git a/src/test/run-make-fulldeps/c-static-dylib/cfoo.c b/src/test/run-make-fulldeps/c-static-dylib/cfoo.c index 113717a776a99..9fe07f82f9ed1 100644 --- a/src/test/run-make-fulldeps/c-static-dylib/cfoo.c +++ b/src/test/run-make-fulldeps/c-static-dylib/cfoo.c @@ -1,2 +1 @@ -// ignore-license int foo() { return 0; } diff --git a/src/test/run-make-fulldeps/c-static-rlib/cfoo.c b/src/test/run-make-fulldeps/c-static-rlib/cfoo.c index 113717a776a99..9fe07f82f9ed1 100644 --- a/src/test/run-make-fulldeps/c-static-rlib/cfoo.c +++ b/src/test/run-make-fulldeps/c-static-rlib/cfoo.c @@ -1,2 +1 @@ -// ignore-license int foo() { return 0; } diff --git a/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp index aac3ba4220101..4c2fb9cdb8782 100644 --- a/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp +++ b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp @@ -1,4 +1,3 @@ -// ignore-license extern "C" void foo() { int *a = new int(3); delete a; diff --git a/src/test/run-make-fulldeps/extern-fn-generic/test.c b/src/test/run-make-fulldeps/extern-fn-generic/test.c index f9faef64afc41..a8504ff2afb06 100644 --- a/src/test/run-make-fulldeps/extern-fn-generic/test.c +++ b/src/test/run-make-fulldeps/extern-fn-generic/test.c @@ -1,4 +1,3 @@ -// ignore-license #include typedef struct TestStruct { diff --git a/src/test/run-make-fulldeps/extern-fn-mangle/test.c b/src/test/run-make-fulldeps/extern-fn-mangle/test.c index 1a9855dedec49..e94d75083b8ff 100644 --- a/src/test/run-make-fulldeps/extern-fn-mangle/test.c +++ b/src/test/run-make-fulldeps/extern-fn-mangle/test.c @@ -1,4 +1,3 @@ -// ignore-license #include uint32_t foo(); diff --git a/src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c b/src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c index c3d6166fb1284..3b6fb4cfce984 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c +++ b/src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c @@ -1,4 +1,3 @@ -// ignore-license #include #include diff --git a/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c index 4124e202c1dd0..52af3dceb109c 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c +++ b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c @@ -1,4 +1,3 @@ -// ignore-license // Pragma needed cause of gcc bug on windows: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991 #include diff --git a/src/test/run-make-fulldeps/extern-fn-with-union/ctest.c b/src/test/run-make-fulldeps/extern-fn-with-union/ctest.c index 8c87c230693d1..86cb64537236e 100644 --- a/src/test/run-make-fulldeps/extern-fn-with-union/ctest.c +++ b/src/test/run-make-fulldeps/extern-fn-with-union/ctest.c @@ -1,4 +1,3 @@ -// ignore-license #include #include diff --git a/src/test/run-make-fulldeps/glibc-staticlib-args/program.c b/src/test/run-make-fulldeps/glibc-staticlib-args/program.c index d704c39d5c42f..30f6974b75086 100644 --- a/src/test/run-make-fulldeps/glibc-staticlib-args/program.c +++ b/src/test/run-make-fulldeps/glibc-staticlib-args/program.c @@ -1,4 +1,3 @@ -// ignore-license void args_check(); int main() { diff --git a/src/test/run-make-fulldeps/interdependent-c-libraries/bar.c b/src/test/run-make-fulldeps/interdependent-c-libraries/bar.c index c761f029effbe..812c975352872 100644 --- a/src/test/run-make-fulldeps/interdependent-c-libraries/bar.c +++ b/src/test/run-make-fulldeps/interdependent-c-libraries/bar.c @@ -1,4 +1,3 @@ -// ignore-license void foo(); void bar() { foo(); } diff --git a/src/test/run-make-fulldeps/interdependent-c-libraries/foo.c b/src/test/run-make-fulldeps/interdependent-c-libraries/foo.c index 2895ad473bf96..85e6cd8c3909a 100644 --- a/src/test/run-make-fulldeps/interdependent-c-libraries/foo.c +++ b/src/test/run-make-fulldeps/interdependent-c-libraries/foo.c @@ -1,2 +1 @@ -// ignore-license void foo() {} diff --git a/src/test/run-make-fulldeps/issue-25581/test.c b/src/test/run-make-fulldeps/issue-25581/test.c index 5736b1730216d..52fbf78510a88 100644 --- a/src/test/run-make-fulldeps/issue-25581/test.c +++ b/src/test/run-make-fulldeps/issue-25581/test.c @@ -1,4 +1,3 @@ -// ignore-license #include #include diff --git a/src/test/run-make-fulldeps/link-path-order/correct.c b/src/test/run-make-fulldeps/link-path-order/correct.c index a595939f92e8c..3064af952f898 100644 --- a/src/test/run-make-fulldeps/link-path-order/correct.c +++ b/src/test/run-make-fulldeps/link-path-order/correct.c @@ -1,2 +1 @@ -// ignore-license int should_return_one() { return 1; } diff --git a/src/test/run-make-fulldeps/link-path-order/wrong.c b/src/test/run-make-fulldeps/link-path-order/wrong.c index c53e7e3c48c05..64275b3ad6bb0 100644 --- a/src/test/run-make-fulldeps/link-path-order/wrong.c +++ b/src/test/run-make-fulldeps/link-path-order/wrong.c @@ -1,2 +1 @@ -// ignore-license int should_return_one() { return 0; } diff --git a/src/test/run-make-fulldeps/linkage-attr-on-static/foo.c b/src/test/run-make-fulldeps/linkage-attr-on-static/foo.c index d7d33ea12e806..78a6934f57f76 100644 --- a/src/test/run-make-fulldeps/linkage-attr-on-static/foo.c +++ b/src/test/run-make-fulldeps/linkage-attr-on-static/foo.c @@ -1,4 +1,3 @@ -// ignore-license #include extern int32_t BAZ; diff --git a/src/test/run-make-fulldeps/lto-smoke-c/bar.c b/src/test/run-make-fulldeps/lto-smoke-c/bar.c index 5729d411c5bcd..bb4036b06e13b 100644 --- a/src/test/run-make-fulldeps/lto-smoke-c/bar.c +++ b/src/test/run-make-fulldeps/lto-smoke-c/bar.c @@ -1,4 +1,3 @@ -// ignore-license void foo(); int main() { diff --git a/src/test/run-make-fulldeps/manual-link/bar.c b/src/test/run-make-fulldeps/manual-link/bar.c index 3c167b45af98d..e42599986781f 100644 --- a/src/test/run-make-fulldeps/manual-link/bar.c +++ b/src/test/run-make-fulldeps/manual-link/bar.c @@ -1,2 +1 @@ -// ignore-license void bar() {} diff --git a/src/test/run-make-fulldeps/manual-link/foo.c b/src/test/run-make-fulldeps/manual-link/foo.c index 3c167b45af98d..e42599986781f 100644 --- a/src/test/run-make-fulldeps/manual-link/foo.c +++ b/src/test/run-make-fulldeps/manual-link/foo.c @@ -1,2 +1 @@ -// ignore-license void bar() {} diff --git a/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c index a6d3bcdc5ac9d..735e2b147fd9e 100644 --- a/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c +++ b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c @@ -1,4 +1,3 @@ -// ignore-license void overflow(); int main() { diff --git a/src/test/ui/attr-shebang.rs b/src/test/ui/attr-shebang.rs index cce31c9bb7b6b..3b0dc096f58fb 100644 --- a/src/test/ui/attr-shebang.rs +++ b/src/test/ui/attr-shebang.rs @@ -3,4 +3,3 @@ #![allow(stable_features)] #![feature(rust1)] pub fn main() { } -// ignore-license diff --git a/src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs b/src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs index ada253aacfb90..802be7f5afb57 100644 --- a/src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs +++ b/src/test/ui/lexer-crlf-line-endings-string-literal-doc-comment.rs @@ -1,11 +1,8 @@ // run-pass -// ignore-tidy-cr ignore-license +// ignore-tidy-cr // ignore-tidy-cr (repeated again because of tidy bug) // license is ignored because tidy can't handle the CRLF here properly. -// http://rust-lang.org/COPYRIGHT. -// - // N.B., this file needs CRLF line endings. The .gitattributes file in // this directory should enforce it. From 768f6f934028d3ac261cc6ad91219f6f90de1d72 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 24 Jan 2020 12:56:32 +0100 Subject: [PATCH 5/7] Clean up error codes E0223 and E0225 explanations --- src/librustc_error_codes/error_codes/E0223.md | 3 ++- src/librustc_error_codes/error_codes/E0225.md | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/librustc_error_codes/error_codes/E0223.md b/src/librustc_error_codes/error_codes/E0223.md index 9fe0360425587..0d49f514ccf4d 100644 --- a/src/librustc_error_codes/error_codes/E0223.md +++ b/src/librustc_error_codes/error_codes/E0223.md @@ -1,5 +1,6 @@ An attempt was made to retrieve an associated type, but the type was ambiguous. -For example: + +Erroneous code example: ```compile_fail,E0223 trait MyTrait {type X; } diff --git a/src/librustc_error_codes/error_codes/E0225.md b/src/librustc_error_codes/error_codes/E0225.md index b9820dc68eeeb..c306e71009715 100644 --- a/src/librustc_error_codes/error_codes/E0225.md +++ b/src/librustc_error_codes/error_codes/E0225.md @@ -1,5 +1,6 @@ -You attempted to use multiple types as bounds for a closure or trait object. -Rust does not currently support this. A simple example that causes this error: +Multiple types were used as bounds for a closure or trait object. + +Erroneous code example: ```compile_fail,E0225 fn main() { @@ -7,6 +8,8 @@ fn main() { } ``` +Rust does not currently support this. + Auto traits such as Send and Sync are an exception to this rule: It's possible to have bounds of one non-builtin trait, plus any number of auto traits. For example, the following compiles correctly: From 50dd8eaeb9ebbccb8b79ff30d3068d0ee337cd2f Mon Sep 17 00:00:00 2001 From: varkor Date: Fri, 24 Jan 2020 16:22:24 +0000 Subject: [PATCH 6/7] Print constants in `type_name` for const generics --- src/librustc/ty/print/pretty.rs | 38 +++++++++++++++---- .../symbol_names/legacy.rs | 2 +- .../interpret/intrinsics/type_name.rs | 5 +-- .../const-generics/const-generic-type_name.rs | 11 ++++++ .../const-generic-type_name.stderr | 8 ++++ 5 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 src/test/ui/const-generics/const-generic-type_name.rs create mode 100644 src/test/ui/const-generics/const-generic-type_name.stderr diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs index 9091de55b7d8e..7dd3c8f4a7295 100644 --- a/src/librustc/ty/print/pretty.rs +++ b/src/librustc/ty/print/pretty.rs @@ -831,7 +831,11 @@ pub trait PrettyPrinter<'tcx>: Ok(self) } - fn pretty_print_const(mut self, ct: &'tcx ty::Const<'tcx>) -> Result { + fn pretty_print_const( + mut self, + ct: &'tcx ty::Const<'tcx>, + print_ty: bool, + ) -> Result { define_scoped_cx!(self); if self.tcx().sess.verbose() { @@ -839,6 +843,15 @@ pub trait PrettyPrinter<'tcx>: return Ok(self); } + macro_rules! print_underscore { + () => {{ + p!(write("_")); + if print_ty { + p!(write(": "), print(ct.ty)); + } + }}; + } + match (ct.val, &ct.ty.kind) { (_, ty::FnDef(did, substs)) => p!(print_value_path(*did, substs)), (ty::ConstKind::Unevaluated(did, substs, promoted), _) => { @@ -857,22 +870,27 @@ pub trait PrettyPrinter<'tcx>: { p!(write("{}", snip)) } else { - p!(write("_: "), print(ct.ty)) + print_underscore!() } } else { - p!(write("_: "), print(ct.ty)) + print_underscore!() } } } } } - (ty::ConstKind::Infer(..), _) => p!(write("_: "), print(ct.ty)), + (ty::ConstKind::Infer(..), _) => print_underscore!(), (ty::ConstKind::Param(ParamConst { name, .. }), _) => p!(write("{}", name)), - (ty::ConstKind::Value(value), _) => return self.pretty_print_const_value(value, ct.ty), + (ty::ConstKind::Value(value), _) => { + return self.pretty_print_const_value(value, ct.ty, print_ty); + } _ => { // fallback - p!(write("{:?} : ", ct.val), print(ct.ty)) + p!(write("{:?}", ct.val)); + if print_ty { + p!(write(" : "), print(ct.ty)); + } } }; Ok(self) @@ -882,6 +900,7 @@ pub trait PrettyPrinter<'tcx>: mut self, ct: ConstValue<'tcx>, ty: Ty<'tcx>, + print_ty: bool, ) -> Result { define_scoped_cx!(self); @@ -988,7 +1007,10 @@ pub trait PrettyPrinter<'tcx>: }; if !printed { // fallback - p!(write("{:?} : ", ct), print(ty)) + p!(write("{:?}", ct)); + if print_ty { + p!(write(" : "), print(ty)); + } } } }; @@ -1162,7 +1184,7 @@ impl Printer<'tcx> for FmtPrinter<'_, 'tcx, F> { } fn print_const(self, ct: &'tcx ty::Const<'tcx>) -> Result { - self.pretty_print_const(ct) + self.pretty_print_const(ct, true) } fn path_crate(mut self, cnum: CrateNum) -> Result { diff --git a/src/librustc_codegen_utils/symbol_names/legacy.rs b/src/librustc_codegen_utils/symbol_names/legacy.rs index 4f5b9ce03fc3f..0dedda9bb6b73 100644 --- a/src/librustc_codegen_utils/symbol_names/legacy.rs +++ b/src/librustc_codegen_utils/symbol_names/legacy.rs @@ -237,7 +237,7 @@ impl Printer<'tcx> for SymbolPrinter<'tcx> { // only print integers if let ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw { .. })) = ct.val { if ct.ty.is_integral() { - return self.pretty_print_const(ct); + return self.pretty_print_const(ct, true); } } self.write_str("_")?; diff --git a/src/librustc_mir/interpret/intrinsics/type_name.rs b/src/librustc_mir/interpret/intrinsics/type_name.rs index eed47c147c60d..cd8bf7085d1b1 100644 --- a/src/librustc_mir/interpret/intrinsics/type_name.rs +++ b/src/librustc_mir/interpret/intrinsics/type_name.rs @@ -69,9 +69,8 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> { } } - fn print_const(self, _: &'tcx ty::Const<'tcx>) -> Result { - // don't print constants to the user - Ok(self) + fn print_const(self, ct: &'tcx ty::Const<'tcx>) -> Result { + self.pretty_print_const(ct, false) } fn print_dyn_existential( diff --git a/src/test/ui/const-generics/const-generic-type_name.rs b/src/test/ui/const-generics/const-generic-type_name.rs new file mode 100644 index 0000000000000..28586426b44e9 --- /dev/null +++ b/src/test/ui/const-generics/const-generic-type_name.rs @@ -0,0 +1,11 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +#[derive(Debug)] +struct S; + +fn main() { + assert_eq!(std::any::type_name::>(), "const_generic_type_name::S<3usize>"); +} diff --git a/src/test/ui/const-generics/const-generic-type_name.stderr b/src/test/ui/const-generics/const-generic-type_name.stderr new file mode 100644 index 0000000000000..6b60a77effea5 --- /dev/null +++ b/src/test/ui/const-generics/const-generic-type_name.stderr @@ -0,0 +1,8 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/const-generic-type_name.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + From 06af44238f2b7a82995dc0a354403ab68dab7cc5 Mon Sep 17 00:00:00 2001 From: BaoshanPang Date: Fri, 17 Jan 2020 09:29:09 -0800 Subject: [PATCH 7/7] Support feature process_set_argv0 for VxWorks --- src/libstd/sys/vxworks/ext/process.rs | 18 ++++++++++++++ .../sys/vxworks/process/process_common.rs | 24 +++++++++++++++---- .../sys/vxworks/process/process_vxworks.rs | 2 +- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/libstd/sys/vxworks/ext/process.rs b/src/libstd/sys/vxworks/ext/process.rs index e535c4aa122f0..31e691dd1360b 100644 --- a/src/libstd/sys/vxworks/ext/process.rs +++ b/src/libstd/sys/vxworks/ext/process.rs @@ -2,6 +2,7 @@ #![stable(feature = "rust1", since = "1.0.0")] +use crate::ffi::OsStr; use crate::io; use crate::process; use crate::sys; @@ -105,6 +106,15 @@ pub trait CommandExt { /// cross-platform `spawn` instead. #[stable(feature = "process_exec2", since = "1.9.0")] fn exec(&mut self) -> io::Error; + + /// Set executable argument + /// + /// Set the first process argument, `argv[0]`, to something other than the + /// default executable path. + #[unstable(feature = "process_set_argv0", issue = "66510")] + fn arg0(&mut self, arg: S) -> &mut process::Command + where + S: AsRef; } #[stable(feature = "rust1", since = "1.0.0")] @@ -130,6 +140,14 @@ impl CommandExt for process::Command { fn exec(&mut self) -> io::Error { self.as_inner_mut().exec(sys::process::Stdio::Inherit) } + + fn arg0(&mut self, arg: S) -> &mut process::Command + where + S: AsRef, + { + self.as_inner_mut().set_arg_0(arg.as_ref()); + self + } } /// Unix-specific extensions to [`process::ExitStatus`]. diff --git a/src/libstd/sys/vxworks/process/process_common.rs b/src/libstd/sys/vxworks/process/process_common.rs index a8139a27537a9..6d5506bec5f7d 100644 --- a/src/libstd/sys/vxworks/process/process_common.rs +++ b/src/libstd/sys/vxworks/process/process_common.rs @@ -90,8 +90,8 @@ impl Command { let program = os2c(program, &mut saw_nul); Command { argv: Argv(vec![program.as_ptr(), ptr::null()]), + args: vec![program.clone()], program, - args: Vec::new(), env: Default::default(), cwd: None, uid: None, @@ -104,11 +104,19 @@ impl Command { } } + pub fn set_arg_0(&mut self, arg: &OsStr) { + // Set a new arg0 + let arg = os2c(arg, &mut self.saw_nul); + debug_assert!(self.argv.0.len() > 1); + self.argv.0[0] = arg.as_ptr(); + self.args[0] = arg; + } + pub fn arg(&mut self, arg: &OsStr) { // Overwrite the trailing NULL pointer in `argv` and then add a new null // pointer. let arg = os2c(arg, &mut self.saw_nul); - self.argv.0[self.args.len() + 1] = arg.as_ptr(); + self.argv.0[self.args.len()] = arg.as_ptr(); self.argv.0.push(ptr::null()); // Also make sure we keep track of the owned value to schedule a @@ -133,6 +141,10 @@ impl Command { &self.argv.0 } + pub fn get_program(&self) -> &CStr { + &*self.program + } + #[allow(dead_code)] pub fn get_cwd(&self) -> &Option { &self.cwd @@ -315,8 +327,12 @@ impl ChildStdio { impl fmt::Debug for Command { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:?}", self.program)?; - for arg in &self.args { + if self.program != self.args[0] { + write!(f, "[{:?}] ", self.program)?; + } + write!(f, "{:?}", self.args[0])?; + + for arg in &self.args[1..] { write!(f, " {:?}", arg)?; } Ok(()) diff --git a/src/libstd/sys/vxworks/process/process_vxworks.rs b/src/libstd/sys/vxworks/process/process_vxworks.rs index ced70dea27f99..f7e84ae3de9c7 100644 --- a/src/libstd/sys/vxworks/process/process_vxworks.rs +++ b/src/libstd/sys/vxworks/process/process_vxworks.rs @@ -67,7 +67,7 @@ impl Command { let _lock = sys::os::env_lock(); let ret = libc::rtpSpawn( - self.get_argv()[0], // executing program + self.get_program().as_ptr(), self.get_argv().as_ptr() as *mut *const c_char, // argv c_envp as *mut *const c_char, 100 as c_int, // initial priority