[INFO] cloning repository https://github.com/abhijeetbhagat/llvm-test [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/abhijeetbhagat/llvm-test" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fabhijeetbhagat%2Fllvm-test", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fabhijeetbhagat%2Fllvm-test'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d1f1e1be2d342229b2226da8044e5684683b3615 [INFO] checking abhijeetbhagat/llvm-test against try#3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f for pr-87248 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fabhijeetbhagat%2Fllvm-test" "/workspace/builds/worker-5/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/abhijeetbhagat/llvm-test on toolchain 3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/abhijeetbhagat/llvm-test [INFO] finished tweaking git repo https://github.com/abhijeetbhagat/llvm-test [INFO] tweaked toml for git repo https://github.com/abhijeetbhagat/llvm-test written to /workspace/builds/worker-5/source/Cargo.toml [INFO] crate git repo https://github.com/abhijeetbhagat/llvm-test already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded llvm-sys v0.2.0 [INFO] [stderr] Downloaded gcc v0.3.13 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d1c4cf05ba714666be925d81722ff5364b6ee8e539334cc3416c100dac3178aa [INFO] running `Command { std: "docker" "start" "-a" "d1c4cf05ba714666be925d81722ff5364b6ee8e539334cc3416c100dac3178aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d1c4cf05ba714666be925d81722ff5364b6ee8e539334cc3416c100dac3178aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d1c4cf05ba714666be925d81722ff5364b6ee8e539334cc3416c100dac3178aa", kill_on_drop: false }` [INFO] [stdout] d1c4cf05ba714666be925d81722ff5364b6ee8e539334cc3416c100dac3178aa [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7bf1fb2e97f5779b33b1a93d9617f1ec6288a11d950aaf324e7fb16ecc114a2f [INFO] running `Command { std: "docker" "start" "-a" "7bf1fb2e97f5779b33b1a93d9617f1ec6288a11d950aaf324e7fb16ecc114a2f", kill_on_drop: false }` [INFO] [stderr] Compiling gcc v0.3.13 [INFO] [stderr] Checking bitflags v0.3.2 [INFO] [stderr] Checking libc v0.1.10 [INFO] [stderr] Compiling llvm-sys v0.2.0 [INFO] [stderr] Checking llvm-test v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:108:31 [INFO] [stdout] | [INFO] [stdout] 108 | let ev1 = try!(e1.codegen(ctxt)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | let ev2 = try!(e2.codegen(ctxt)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exit_function` [INFO] [stdout] --> src/main.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | let exit_function = llvm::core::LLVMAddFunction(ctxt.module, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_exit_function` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unwrapped_body` [INFO] [stdout] --> src/main.rs:163:13 [INFO] [stdout] | [INFO] [stdout] 163 | let unwrapped_body = match body{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unwrapped_body` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `store` [INFO] [stdout] --> src/main.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let store = llvm::core::LLVMBuildStore(ctxt.builder, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_store` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `module_name` [INFO] [stdout] --> src/main.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | fn new(module_name : &str) -> Self{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_module_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `named_values` [INFO] [stdout] --> src/main.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | named_values : HashMap [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:65:112 [INFO] [stdout] | [INFO] [stdout] 65 | let llvm_module = llvm::core::LLVMModuleCreateWithNameInContext(ffi::CString::new("mod1").unwrap().as_ptr(), llvm_context); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(temporary_cstring_as_ptr)]` on by default [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:144:95 [INFO] [stdout] | [INFO] [stdout] 144 | ... ffi::CString::new("printf").unwrap().as_ptr(), [INFO] [stdout] | ------------------------------------ ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:151:90 [INFO] [stdout] | [INFO] [stdout] 151 | ... ffi::CString::new("exit").unwrap().as_ptr(), [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:156:100 [INFO] [stdout] | [INFO] [stdout] 156 | let function = llvm::core::LLVMAddFunction(ctxt.module, ffi::CString::new("main").unwrap().as_ptr(), proto); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:170:81 [INFO] [stdout] | [INFO] [stdout] 170 | ... ffi::CString::new("entry").unwrap().as_ptr()); [INFO] [stdout] | ----------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:173:148 [INFO] [stdout] | [INFO] [stdout] 173 | ...LVMIntTypeInContext(ctxt.context, 32), ffi::CString::new("a").unwrap().as_ptr()); [INFO] [stdout] | ------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:179:92 [INFO] [stdout] | [INFO] [stdout] 179 | ... ffi::CString::new("%d\n").unwrap().as_ptr(), [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:180:92 [INFO] [stdout] | [INFO] [stdout] 180 | ... ffi::CString::new(".str").unwrap().as_ptr()); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:183:97 [INFO] [stdout] | [INFO] [stdout] 183 | let l = llvm::core::LLVMBuildLoad(ctxt.builder, alloca, ffi::CString::new("a").unwrap().as_ptr()); [INFO] [stdout] | ------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:189:70 [INFO] [stdout] | [INFO] [stdout] 189 | ... ffi::CString::new("call").unwrap().as_ptr()); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:199:90 [INFO] [stdout] | [INFO] [stdout] 199 | ... ffi::CString::new("i386").unwrap().as_ptr(), [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:200:86 [INFO] [stdout] | [INFO] [stdout] 200 | ... ffi::CString::new("").unwrap().as_ptr(), [INFO] [stdout] | ------------------------------ ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `B` should have a snake case name [INFO] [stdout] --> src/main.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn B(value : T)->B{ [INFO] [stdout] | ^ help: convert the identifier to snake case: `b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:108:31 [INFO] [stdout] | [INFO] [stdout] 108 | let ev1 = try!(e1.codegen(ctxt)); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/main.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | let ev2 = try!(e2.codegen(ctxt)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 21 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exit_function` [INFO] [stdout] --> src/main.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | let exit_function = llvm::core::LLVMAddFunction(ctxt.module, [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_exit_function` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unwrapped_body` [INFO] [stdout] --> src/main.rs:163:13 [INFO] [stdout] | [INFO] [stdout] 163 | let unwrapped_body = match body{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unwrapped_body` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `store` [INFO] [stdout] --> src/main.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let store = llvm::core::LLVMBuildStore(ctxt.builder, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_store` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `module_name` [INFO] [stdout] --> src/main.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | fn new(module_name : &str) -> Self{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_module_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `named_values` [INFO] [stdout] --> src/main.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | named_values : HashMap [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:65:112 [INFO] [stdout] | [INFO] [stdout] 65 | let llvm_module = llvm::core::LLVMModuleCreateWithNameInContext(ffi::CString::new("mod1").unwrap().as_ptr(), llvm_context); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(temporary_cstring_as_ptr)]` on by default [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:144:95 [INFO] [stdout] | [INFO] [stdout] 144 | ... ffi::CString::new("printf").unwrap().as_ptr(), [INFO] [stdout] | ------------------------------------ ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:151:90 [INFO] [stdout] | [INFO] [stdout] 151 | ... ffi::CString::new("exit").unwrap().as_ptr(), [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:156:100 [INFO] [stdout] | [INFO] [stdout] 156 | let function = llvm::core::LLVMAddFunction(ctxt.module, ffi::CString::new("main").unwrap().as_ptr(), proto); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:170:81 [INFO] [stdout] | [INFO] [stdout] 170 | ... ffi::CString::new("entry").unwrap().as_ptr()); [INFO] [stdout] | ----------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:173:148 [INFO] [stdout] | [INFO] [stdout] 173 | ...LVMIntTypeInContext(ctxt.context, 32), ffi::CString::new("a").unwrap().as_ptr()); [INFO] [stdout] | ------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:179:92 [INFO] [stdout] | [INFO] [stdout] 179 | ... ffi::CString::new("%d\n").unwrap().as_ptr(), [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:180:92 [INFO] [stdout] | [INFO] [stdout] 180 | ... ffi::CString::new(".str").unwrap().as_ptr()); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:183:97 [INFO] [stdout] | [INFO] [stdout] 183 | let l = llvm::core::LLVMBuildLoad(ctxt.builder, alloca, ffi::CString::new("a").unwrap().as_ptr()); [INFO] [stdout] | ------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:189:70 [INFO] [stdout] | [INFO] [stdout] 189 | ... ffi::CString::new("call").unwrap().as_ptr()); [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:199:90 [INFO] [stdout] | [INFO] [stdout] 199 | ... ffi::CString::new("i386").unwrap().as_ptr(), [INFO] [stdout] | ---------------------------------- ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: getting the inner pointer of a temporary `CString` [INFO] [stdout] --> src/main.rs:200:86 [INFO] [stdout] | [INFO] [stdout] 200 | ... ffi::CString::new("").unwrap().as_ptr(), [INFO] [stdout] | ------------------------------ ^^^^^^ this pointer will be invalid [INFO] [stdout] | | [INFO] [stdout] | this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime [INFO] [stdout] | [INFO] [stdout] = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned [INFO] [stdout] = help: for more information, see https://doc.rust-lang.org/reference/destructors.html [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `B` should have a snake case name [INFO] [stdout] --> src/main.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn B(value : T)->B{ [INFO] [stdout] | ^ help: convert the identifier to snake case: `b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 21 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.57s [INFO] running `Command { std: "docker" "inspect" "7bf1fb2e97f5779b33b1a93d9617f1ec6288a11d950aaf324e7fb16ecc114a2f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7bf1fb2e97f5779b33b1a93d9617f1ec6288a11d950aaf324e7fb16ecc114a2f", kill_on_drop: false }` [INFO] [stdout] 7bf1fb2e97f5779b33b1a93d9617f1ec6288a11d950aaf324e7fb16ecc114a2f