diff --git a/src/main.rs b/src/main.rs index b86a84b..3625032 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,22 +1,16 @@ #[derive(Debug)] -struct Point(i32, i32); +struct Highlight<'doc>(&'doc str); -fn left_most<'a>(p1: &'a Point, p2: &'a Point) -> &'a Point { - if p1.0 < p2.0 { - p1 - } else { - p2 - } +#[allow(dead_code)] +fn erase(text: String) { + println!("Bye {text}!"); } fn main() { - let p1: Point = Point(10, 10); - let p2: Point = Point(20, 20); - { - let p3: &Point = left_most(&p1, &p2); - - println!("left_most: {:?}", p3); - println!("p3: {:p}", &p3); - } - println!("p1: {:p}", &p1); + let text = String::from("The quick brown fox jumps over the lazy dog."); + let fox = Highlight(&text[4..19]); + let dog = Highlight(&text[35..43]); + //erase(text); + println!("{fox:?}"); + println!("{dog:?}"); } diff --git a/target/.rustc_info.json b/target/.rustc_info.json index 889c439..6843bbb 100644 --- a/target/.rustc_info.json +++ b/target/.rustc_info.json @@ -1 +1 @@ -{"rustc_fingerprint":16320356917333427825,"outputs":{"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/vbatts/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.66.1 (90743e729 2023-01-10)\nbinary: rustc\ncommit-hash: 90743e7298aca107ddaa0c202a4d3604e29bfeb6\ncommit-date: 2023-01-10\nhost: x86_64-unknown-linux-gnu\nrelease: 1.66.1\nLLVM version: 15.0.2\n","stderr":""}},"successes":{}} \ No newline at end of file +{"rustc_fingerprint":16320356917333427825,"outputs":{"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.66.1 (90743e729 2023-01-10)\nbinary: rustc\ncommit-hash: 90743e7298aca107ddaa0c202a4d3604e29bfeb6\ncommit-date: 2023-01-10\nhost: x86_64-unknown-linux-gnu\nrelease: 1.66.1\nLLVM version: 15.0.2\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/vbatts/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/target/debug/basics00 b/target/debug/basics00 index 98eb069..3748400 100755 Binary files a/target/debug/basics00 and b/target/debug/basics00 differ diff --git a/target/debug/deps/basics00-837a95fe33c7c079 b/target/debug/deps/basics00-837a95fe33c7c079 index 98eb069..3748400 100755 Binary files a/target/debug/deps/basics00-837a95fe33c7c079 and b/target/debug/deps/basics00-837a95fe33c7c079 differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/1flo4x0vfn957dou.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/1flo4x0vfn957dou.o deleted file mode 100644 index fae65f0..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/1flo4x0vfn957dou.o and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/1o4jj7fedyqxl015.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/1o4jj7fedyqxl015.o deleted file mode 100644 index acf98c6..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/1o4jj7fedyqxl015.o and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/3ff68b9qa7oq14ky.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/3ff68b9qa7oq14ky.o deleted file mode 100644 index aec91d8..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/3ff68b9qa7oq14ky.o and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/4qlgwb3loiguc5oq.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/4qlgwb3loiguc5oq.o deleted file mode 100644 index 0d574ab..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/4qlgwb3loiguc5oq.o and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/dep-graph.bin b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/dep-graph.bin deleted file mode 100644 index bb54281..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/dep-graph.bin and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/mwaxihrequg68jr.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/mwaxihrequg68jr.o deleted file mode 100644 index 78cd172..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/mwaxihrequg68jr.o and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/work-products.bin b/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/work-products.bin deleted file mode 100644 index e29ee3f..0000000 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/work-products.bin and /dev/null differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/15z031qvwu7uwuwb.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/15z031qvwu7uwuwb.o new file mode 100644 index 0000000..4cb91f7 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/15z031qvwu7uwuwb.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/1flo4x0vfn957dou.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/1flo4x0vfn957dou.o new file mode 100644 index 0000000..c1cee1c Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/1flo4x0vfn957dou.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/20g1uh68tfrguypa.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/20g1uh68tfrguypa.o similarity index 100% rename from target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/20g1uh68tfrguypa.o rename to target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/20g1uh68tfrguypa.o diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/220p8y8jth3f7nrz.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/220p8y8jth3f7nrz.o similarity index 100% rename from target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/220p8y8jth3f7nrz.o rename to target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/220p8y8jth3f7nrz.o diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/29h7i5qu6cpdaqvg.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/29h7i5qu6cpdaqvg.o new file mode 100644 index 0000000..ab13fee Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/29h7i5qu6cpdaqvg.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2bu1z933r12o9ili.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2bu1z933r12o9ili.o new file mode 100644 index 0000000..265a120 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2bu1z933r12o9ili.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2bwtd3dqojrbnr9h.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2bwtd3dqojrbnr9h.o new file mode 100644 index 0000000..d9e8847 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2bwtd3dqojrbnr9h.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/2cumrsybhfasw9r6.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2cumrsybhfasw9r6.o similarity index 100% rename from target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/2cumrsybhfasw9r6.o rename to target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2cumrsybhfasw9r6.o diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2hd3o6brin8hudq9.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2hd3o6brin8hudq9.o new file mode 100644 index 0000000..2a2ac6d Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2hd3o6brin8hudq9.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2lkowcqp1zhwvtne.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2lkowcqp1zhwvtne.o new file mode 100644 index 0000000..6c8bd1e Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2lkowcqp1zhwvtne.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/2oz5c3a1wkrjyhl3.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2oz5c3a1wkrjyhl3.o similarity index 100% rename from target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/2oz5c3a1wkrjyhl3.o rename to target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2oz5c3a1wkrjyhl3.o diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2rye4qqvgksx3dzi.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2rye4qqvgksx3dzi.o new file mode 100644 index 0000000..f42c019 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2rye4qqvgksx3dzi.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2yo46jvjrjw0780a.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2yo46jvjrjw0780a.o new file mode 100644 index 0000000..691c695 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/2yo46jvjrjw0780a.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4mh99a2ac6mig6lw.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4mh99a2ac6mig6lw.o new file mode 100644 index 0000000..a624dec Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4mh99a2ac6mig6lw.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4qlgwb3loiguc5oq.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4qlgwb3loiguc5oq.o new file mode 100644 index 0000000..c114284 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4qlgwb3loiguc5oq.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4wyu3enot1ak3nwp.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4wyu3enot1ak3nwp.o new file mode 100644 index 0000000..1fa9132 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4wyu3enot1ak3nwp.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4xubmzr981d6br3a.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4xubmzr981d6br3a.o new file mode 100644 index 0000000..0231467 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/4xubmzr981d6br3a.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/6svruwh6xeer5vo.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/6svruwh6xeer5vo.o new file mode 100644 index 0000000..4e3fb2b Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/6svruwh6xeer5vo.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/dep-graph.bin b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/dep-graph.bin new file mode 100644 index 0000000..a19bce8 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/dep-graph.bin differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/fwz6p13t9ze8n5f.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/fwz6p13t9ze8n5f.o new file mode 100644 index 0000000..e6bcef2 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/fwz6p13t9ze8n5f.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/j3r3fv6sofevcox.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/j3r3fv6sofevcox.o new file mode 100644 index 0000000..48b6c91 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/j3r3fv6sofevcox.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/mwaxihrequg68jr.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/mwaxihrequg68jr.o new file mode 100644 index 0000000..bdfbc98 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/mwaxihrequg68jr.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/query-cache.bin b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/query-cache.bin similarity index 60% rename from target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/query-cache.bin rename to target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/query-cache.bin index e421cd1..9a9c9e7 100644 Binary files a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4-r3tyri9zmkpa/query-cache.bin and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/query-cache.bin differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/work-products.bin b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/work-products.bin new file mode 100644 index 0000000..77d5c47 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/work-products.bin differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/y4yihnopea6okns.o b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/y4yihnopea6okns.o new file mode 100644 index 0000000..665a0b4 Binary files /dev/null and b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z-2chrelq2wp623/y4yihnopea6okns.o differ diff --git a/target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4.lock b/target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z.lock similarity index 100% rename from target/debug/incremental/basics00-12w982f9njolw/s-ghf0d7i821-18g95q4.lock rename to target/debug/incremental/basics00-12w982f9njolw/s-ghfqo9aucv-1jzl98z.lock