Home
last modified time | relevance | path

Searched full:rustc (Results 1 – 25 of 5538) sorted by relevance

12345678910>>...222

/third_party/rust/rust/tests/run-make/mixing-formats/
DMakefile18 $(RUSTC) --crate-type=rlib foo.rs
19 $(RUSTC) --crate-type=dylib bar1.rs -C prefer-dynamic
20 $(RUSTC) --crate-type=dylib,rlib baz.rs -C prefer-dynamic
21 $(RUSTC) --crate-type=bin baz.rs
23 $(RUSTC) --crate-type=dylib foo.rs -C prefer-dynamic
24 $(RUSTC) --crate-type=rlib bar1.rs
25 $(RUSTC) --crate-type=dylib,rlib baz.rs -C prefer-dynamic
26 $(RUSTC) --crate-type=bin baz.rs
29 $(RUSTC) --crate-type=rlib foo.rs
30 $(RUSTC) --crate-type=dylib bar1.rs -C prefer-dynamic
[all …]
/third_party/rust/crates/rust-openssl/openssl/
Dbuild.rs11 println!("cargo:rustc-cfg=libressl"); in main()
15 println!("cargo:rustc-cfg=boringssl"); in main()
23 println!("cargo:rustc-cfg=libressl250"); in main()
26 println!("cargo:rustc-cfg=libressl251"); in main()
29 println!("cargo:rustc-cfg=libressl261"); in main()
32 println!("cargo:rustc-cfg=libressl270"); in main()
35 println!("cargo:rustc-cfg=libressl271"); in main()
38 println!("cargo:rustc-cfg=libressl273"); in main()
41 println!("cargo:rustc-cfg=libressl280"); in main()
44 println!("cargo:rustc-cfg=libressl291"); in main()
[all …]
/third_party/rust/rust/tests/run-make/issue64319/
DMakefile8 $(RUSTC) --crate-type rlib foo.rs
9 $(RUSTC) --crate-type dylib bar.rs -C opt-level=3
12 $(RUSTC) --crate-type rlib foo.rs -Z share-generics=no
13 $(RUSTC) --crate-type dylib bar.rs -Z share-generics=no
14 $(RUSTC) --crate-type rlib foo.rs -Z share-generics=no
15 $(RUSTC) --crate-type dylib bar.rs -Z share-generics=yes
16 $(RUSTC) --crate-type rlib foo.rs -Z share-generics=yes
17 $(RUSTC) --crate-type dylib bar.rs -Z share-generics=no
18 $(RUSTC) --crate-type rlib foo.rs -Z share-generics=yes
19 $(RUSTC) --crate-type dylib bar.rs -Z share-generics=yes
[all …]
/third_party/rust/rust/tests/ui/feature-gates/
Dfeature-gate-rustc-attrs.stderr1 error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
2 --> $DIR/feature-gate-rustc-attrs.rs:8:3
4 LL | #[rustc::unknown]
7 error: expected attribute, found macro `rustc::unknown`
8 --> $DIR/feature-gate-rustc-attrs.rs:8:3
10 LL | #[rustc::unknown]
13 error: attributes starting with `rustc` are reserved for use by the `rustc` compiler
14 --> $DIR/feature-gate-rustc-attrs.rs:13:12
16 LL | #[unknown::rustc]
19 error: expected attribute, found macro `unknown::rustc`
[all …]
Dfeature-gate-rustc-attrs.rs5 mod rustc { pub macro unknown() {} } module
6 mod unknown { pub macro rustc() {} }
8 #[rustc::unknown]
9 //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
10 //~| ERROR expected attribute, found macro `rustc::unknown`
13 #[unknown::rustc]
14 //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
15 //~| ERROR expected attribute, found macro `unknown::rustc`
19 //~^ ERROR the `#[rustc_dummy]` attribute is just used for rustc unit tests
21 //~^ ERROR attributes starting with `rustc` are reserved for use by the `rustc` compiler
/third_party/rust/rust/tests/run-make/compiler-lookup-paths/
DMakefile10 $(RUSTC) a.rs
12 $(RUSTC) b.rs -L native=$(TMPDIR)/crate && exit 1 || exit 0
13 $(RUSTC) b.rs -L dependency=$(TMPDIR)/crate && exit 1 || exit 0
14 $(RUSTC) b.rs -L crate=$(TMPDIR)/crate
15 $(RUSTC) b.rs -L all=$(TMPDIR)/crate
16 $(RUSTC) c.rs -L native=$(TMPDIR)/crate && exit 1 || exit 0
17 $(RUSTC) c.rs -L crate=$(TMPDIR)/crate && exit 1 || exit 0
18 $(RUSTC) c.rs -L dependency=$(TMPDIR)/crate
19 $(RUSTC) c.rs -L all=$(TMPDIR)/crate
20 $(RUSTC) d.rs -L dependency=$(TMPDIR)/native && exit 1 || exit 0
[all …]
/third_party/rust/rust/tests/run-make/reproducible-build/
DMakefile28 $(RUSTC) linker.rs -O
29 $(RUSTC) reproducible-build-aux.rs
30 $(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker)
31 $(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker)
36 $(RUSTC) linker.rs -O
37 $(RUSTC) reproducible-build-aux.rs -g
38 $(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker) -g
39 $(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker) -g
44 $(RUSTC) linker.rs -O
45 $(RUSTC) reproducible-build-aux.rs -O
[all …]
/third_party/rust/crates/proc-macro2/
Dbuild.rs14 let rustc = rustc_minor_version().unwrap_or(u32::MAX); in main() localVariable
16 if rustc >= 80 { in main()
17 println!("cargo:rustc-check-cfg=cfg(fuzzing)"); in main()
18 println!("cargo:rustc-check-cfg=cfg(no_is_available)"); in main()
19 println!("cargo:rustc-check-cfg=cfg(no_literal_byte_character)"); in main()
20 println!("cargo:rustc-check-cfg=cfg(no_literal_c_string)"); in main()
21 println!("cargo:rustc-check-cfg=cfg(no_source_text)"); in main()
22 println!("cargo:rustc-check-cfg=cfg(proc_macro_span)"); in main()
23 println!("cargo:rustc-check-cfg=cfg(procmacro2_backtrace)"); in main()
24 println!("cargo:rustc-check-cfg=cfg(procmacro2_nightly_testing)"); in main()
[all …]
/third_party/rust/rust/tests/run-make/output-type-permutations/
DMakefile5 $(RUSTC) foo.rs --crate-type=rlib,dylib,staticlib
13 $(RUSTC) foo.rs --crate-type=bin
18 $(RUSTC) foo.rs --emit=asm,llvm-ir,llvm-bc,obj,link
27 $(RUSTC) foo.rs --emit asm -o $(TMPDIR)/foo
29 $(RUSTC) foo.rs --emit asm=$(TMPDIR)/foo
31 $(RUSTC) foo.rs --emit=asm=$(TMPDIR)/foo
35 $(RUSTC) foo.rs --emit llvm-bc -o $(TMPDIR)/foo
37 $(RUSTC) foo.rs --emit llvm-bc=$(TMPDIR)/foo
39 $(RUSTC) foo.rs --emit=llvm-bc=$(TMPDIR)/foo
43 $(RUSTC) foo.rs --emit llvm-ir -o $(TMPDIR)/foo
[all …]
/third_party/rust/rust/compiler/rustc_codegen_cranelift/patches/
Dstdlib-lock.toml13 "rustc-std-workspace-alloc",
14 "rustc-std-workspace-core",
24 "rustc-std-workspace-core",
66 "rustc-std-workspace-core",
76 "rustc-std-workspace-core",
105 "rustc-std-workspace-core",
115 "rustc-std-workspace-core",
130 "rustc-std-workspace-core",
131 "rustc-std-workspace-std",
142 "rustc-std-workspace-alloc",
[all …]
/third_party/rust/crates/autocfg/src/
Drustc.rs10 pub struct Rustc { struct
11 rustc: PathBuf, field
16 impl Rustc { impl
18 Rustc { in new()
19 rustc: env::var_os("RUSTC") in new()
20 .unwrap_or_else(|| "rustc".into()) in new()
29 let mut rustc = self in command() localVariable
33 .chain(Some(&self.rustc)); in command()
34 let mut command = Command::new(rustc.next().unwrap()); in command()
35 for arg in rustc { in command()
[all …]
/third_party/rust/crates/version_check/src/
Dlib.rs1 //! This tiny crate checks that the running or installed `rustc` meets some
4 //! `RUSTC` environment variable. If it is not set, then `rustc` is used. If
13 //! extern crate version_check as rustc;
15 //! if rustc::is_min_version("1.13.0").unwrap_or(false) {
16 //! println!("cargo:rustc-cfg=question_mark_operator");
26 //! extern crate version_check as rustc;
28 //! match rustc::is_min_date("2018-12-18") {
31 //! None => "Couldn't determine the rustc version."
41 //! extern crate version_check as rustc;
43 //! match rustc::is_feature_flaggable() {
[all …]
/third_party/rust/rust/src/tools/miri/
DCONTRIBUTING.md17 Miri heavily relies on internal and unstable rustc interfaces to execute MIR,
18 which means it is important that you install a version of rustc that Miri
21 The `rust-version` file contains the commit hash of rustc that Miri is currently
24 install that exact version of rustc as a toolchain:
54 basically a version of `rustc` that, instead of compiling your code, runs it.
55 It accepts all the same flags as `rustc` (though the ones only affecting code
96 the `rustc_middle::mir::interpret` and `rustc_mir::interpret` modules in rustc. You
166 "rust-analyzer.rustc.source": "discover",
176 "clippy", // make this `check` when working with a locally built rustc
193 > If you are [building Miri with a locally built rustc][], set
[all …]
/third_party/rust/crates/serde/serde/
Dbuild.rs5 // The rustc-cfg strings below are *not* public API. Please let us know by
24 println!("cargo:rustc-cfg=no_core_try_from"); in main()
25 println!("cargo:rustc-cfg=no_num_nonzero_signed"); in main()
26 println!("cargo:rustc-cfg=no_systemtime_checked_add"); in main()
27 println!("cargo:rustc-cfg=no_relaxed_trait_bounds"); in main()
33 println!("cargo:rustc-cfg=no_float_copysign"); in main()
38 println!("cargo:rustc-cfg=no_serde_derive"); in main()
43 println!("cargo:rustc-cfg=no_target_has_atomic"); in main()
45 // based on rustc's compiler/rustc_target/src/spec/*.rs. in main()
55 println!("cargo:rustc-cfg=no_std_atomic64"); in main()
[all …]
/third_party/rust/rust/src/doc/rustc/src/
Dwhat-is-rustc.md1 # What is rustc?
3 Welcome to "The rustc book"! `rustc` is the compiler for the Rust programming
7 Most Rust programmers don't invoke `rustc` directly, but instead do it through
8 [Cargo](../cargo/index.html). It's all in service of `rustc` though! If you
9 want to see how Cargo calls `rustc`, you can
15 And it will print out each `rustc` invocation. This book can help you
17 Rustaceans use Cargo, not all do: sometimes they integrate `rustc` into other
31 To turn this source code into an executable, you can use `rustc`:
34 $ rustc hello.rs
39 Note that we only ever pass `rustc` the *crate root*, not every file we wish
[all …]
/third_party/rust/rust/tests/run-make/debug-assertions/
DMakefile6 $(RUSTC) debug.rs -C debug-assertions=no
8 $(RUSTC) debug.rs -C opt-level=0
10 $(RUSTC) debug.rs -C opt-level=1
12 $(RUSTC) debug.rs -C opt-level=2
14 $(RUSTC) debug.rs -C opt-level=3
16 $(RUSTC) debug.rs -C opt-level=s
18 $(RUSTC) debug.rs -C opt-level=z
20 $(RUSTC) debug.rs -O
22 $(RUSTC) debug.rs
24 $(RUSTC) debug.rs -C debug-assertions=yes -O
[all …]
/third_party/rust/rust/tests/run-make/lto-smoke/
DMakefile7 $(RUSTC) lib.rs
8 $(RUSTC) main.rs -C lto
12 $(RUSTC) lib.rs
13 $(RUSTC) main.rs -C lto=yes
18 $(RUSTC) lib.rs
19 $(RUSTC) main.rs -C lto=off
23 $(RUSTC) lib.rs
24 $(RUSTC) main.rs -C lto=thin
28 $(RUSTC) lib.rs
29 $(RUSTC) main.rs -C lto=fat
/third_party/rust/rust/tests/run-make/codegen-options-parsing/
DMakefile6 $(RUSTC) -C codegen-units dummy.rs 2>&1 | \
8 $(RUSTC) -C codegen-units= dummy.rs 2>&1 | \
10 $(RUSTC) -C codegen-units=foo dummy.rs 2>&1 | \
12 $(RUSTC) -C codegen-units=1 dummy.rs
14 $(RUSTC) -C extra-filename dummy.rs 2>&1 | \
16 $(RUSTC) -C extra-filename= dummy.rs 2>&1
17 $(RUSTC) -C extra-filename=foo dummy.rs 2>&1
19 $(RUSTC) -C lto= dummy.rs 2>&1 | \
21 $(RUSTC) -C lto=1 dummy.rs 2>&1 | \
23 $(RUSTC) -C lto=foo dummy.rs 2>&1 | \
[all …]
/third_party/rust/rust/tests/run-make/extern-flag-fun/
DMakefile5 $(RUSTC) bar.rs --crate-type=rlib
6 $(RUSTC) bar.rs --crate-type=rlib -C extra-filename=-a
7 $(RUSTC) bar-alt.rs --crate-type=rlib
8 $(RUSTC) foo.rs --extern bar=no-exist && exit 1 || exit 0
9 $(RUSTC) foo.rs --extern bar=foo.rs && exit 1 || exit 0
10 $(RUSTC) foo.rs \
14 $(RUSTC) foo.rs \
17 $(RUSTC) foo.rs --extern bar=$(TMPDIR)/libbar.rlib
19 $(RUSTC) rustc.rs -Zforce-unstable-if-unmarked --crate-type=rlib
20 $(RUSTC) gated_unstable.rs --extern alloc=$(TMPDIR)/librustc.rlib 2>&1 | $(CGREP) 'rustc_private'
/third_party/rust/rust/
DCONTRIBUTING.md11 Documentation for contributing to the compiler or tooling is located in the [Guide to Rustc
12 Development][rustc-dev-guide], commonly known as the [rustc-dev-guide]. Documentation for the
15 ## About the [rustc-dev-guide]
17 The [rustc-dev-guide] is meant to help document how rustc –the Rust compiler– works,
18 as well as to help new contributors get involved in rustc development. It is recommend
19 to read and understand the [rustc-dev-guide] before making a contribution. This guide
23 ## [Getting help](https://rustc-dev-guide.rust-lang.org/getting-started.html#asking-questions)
29 [Asking Questions](https://rustc-dev-guide.rust-lang.org/getting-started.html#asking-questions) cha…
36 [rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/
38 [contributing-bug-reports]: https://rustc-dev-guide.rust-lang.org/contributing.html#bug-reports
/third_party/rust/rust/tests/run-make/atomic-lock-free/
DMakefile9 $(RUSTC) --target=i686-unknown-linux-gnu atomic_lock_free.rs
11 $(RUSTC) --target=x86_64-unknown-linux-gnu atomic_lock_free.rs
15 $(RUSTC) --target=arm-unknown-linux-gnueabi atomic_lock_free.rs
17 $(RUSTC) --target=arm-unknown-linux-gnueabihf atomic_lock_free.rs
19 $(RUSTC) --target=armv7-unknown-linux-gnueabihf atomic_lock_free.rs
21 $(RUSTC) --target=thumbv7neon-unknown-linux-gnueabihf atomic_lock_free.rs
25 $(RUSTC) --target=aarch64-unknown-linux-gnu atomic_lock_free.rs
29 $(RUSTC) --target=mips-unknown-linux-gnu atomic_lock_free.rs
31 $(RUSTC) --target=mipsel-unknown-linux-gnu atomic_lock_free.rs
35 $(RUSTC) --target=powerpc-unknown-linux-gnu atomic_lock_free.rs
[all …]
/third_party/rust/rust/tests/run-make/emit-to-stdout/
DMakefile9 $(RUSTC) --emit asm=$(OUT)/$@ $(SRC)
10 $(RUSTC) --emit asm=- $(SRC) | diff - $(OUT)/$@
12 $(RUSTC) --emit llvm-ir=$(OUT)/$@ $(SRC)
13 $(RUSTC) --emit llvm-ir=- $(SRC) | diff - $(OUT)/$@
15 $(RUSTC) -Z dep-info-omit-d-target=yes --emit dep-info=$(OUT)/$@ $(SRC)
16 $(RUSTC) --emit dep-info=- $(SRC) | diff - $(OUT)/$@
18 $(RUSTC) --emit mir=$(OUT)/$@ $(SRC)
19 $(RUSTC) --emit mir=- $(SRC) | diff - $(OUT)/$@
22 $(RUSTC) --emit llvm-bc=- $(SRC) 1>/dev/ptmx 2>$(OUT)/$@ || true
25 $(RUSTC) --emit obj=- $(SRC) 1>/dev/ptmx 2>$(OUT)/$@ || true
[all …]
/third_party/rust/crates/io-lifetimes/
Dbuild.rs20 // the rustc version. in main()
31 println!("cargo:rustc-cfg={}", feature); in use_feature()
34 /// Test whether the rustc at `var("RUSTC")` supports the given feature.
42 /// Test whether the rustc at `var("RUSTC")` can compile the given code.
47 let rustc = var("RUSTC").unwrap(); in can_compile() localVariable
52 // The wrapper's first argument is supposed to be the path to rustc. in can_compile()
53 cmd.arg(rustc); in can_compile()
56 std::process::Command::new(rustc) in can_compile()
87 /// Test whether the rustc at `var("RUSTC")` supports panic in `const fn`.
92 /// Test whether the rustc at `var("RUSTC")` supports the I/O safety feature.
/third_party/rust/rust/tests/run-make/emit/
DMakefile5 $(RUSTC) -Copt-level=0 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
6 $(RUSTC) -Copt-level=1 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
7 $(RUSTC) -Copt-level=2 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
8 $(RUSTC) -Copt-level=3 --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
9 $(RUSTC) -Copt-level=s --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
10 $(RUSTC) -Copt-level=z --emit=llvm-bc,llvm-ir,asm,obj,link test-24876.rs
11 $(RUSTC) -Copt-level=0 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
13 $(RUSTC) -Copt-level=1 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
15 $(RUSTC) -Copt-level=2 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
17 $(RUSTC) -Copt-level=3 --emit=llvm-bc,llvm-ir,asm,obj,link test-26235.rs
[all …]
/third_party/rust/crates/version_check/
DREADME.md7 This tiny crate checks that the running or installed `rustc` meets some version
9 `--version`. The path to the compiler is determined first via the `RUSTC`
10 environment variable. If it is not set, then `rustc` is used. If that fails, no
30 extern crate version_check as rustc;
32 if rustc::is_min_version("1.13.0").unwrap_or(false) {
33 println!("cargo:rustc-cfg=question_mark_operator");
40 extern crate version_check as rustc;
42 match rustc::is_min_date("2018-12-18") {
45 None => "Couldn't determine the rustc version."
52 extern crate version_check as rustc;
[all …]

12345678910>>...222