top | item 43941769 (no title) vvanders | 9 months ago That only applies when dynamic dispatch is involved and the linker can't trace the calls. For direct calls and generics(which idiomatic Rust code tends to prefer over dyn traits) LTO will prune extensively. discuss order hn newest rafram|9 months ago let uri = get_uri_from_stdin(); networking_library::make_request(uri); How is the compiler supposed to prune that? f_devd|9 months ago let uri: Uri<HTTP> = get_uri_from_stdin().parse()?; If the library is made in a modular way this is how it would typically be done. The `HTTP` may be inferred by calls further along in the function. load replies (2)
rafram|9 months ago let uri = get_uri_from_stdin(); networking_library::make_request(uri); How is the compiler supposed to prune that? f_devd|9 months ago let uri: Uri<HTTP> = get_uri_from_stdin().parse()?; If the library is made in a modular way this is how it would typically be done. The `HTTP` may be inferred by calls further along in the function. load replies (2)
f_devd|9 months ago let uri: Uri<HTTP> = get_uri_from_stdin().parse()?; If the library is made in a modular way this is how it would typically be done. The `HTTP` may be inferred by calls further along in the function. load replies (2)
rafram|9 months ago
f_devd|9 months ago