rust-analyzer/crates/ra_hir_def/src
David Tolnay 4461796f33
Fix type inference failure when built with log/kv_unstable
This code is broken by an `impl From<kv::Error> for fmt::Error` in the
log crate when building in a codebase that has the log/kv_unstable
feature enabled.

    $ cargo check --manifest-path crates/ra_hir_def/Cargo.toml
        Checking ra_hir_def v0.1.0
        Finished dev [unoptimized] target(s) in 0.75s

    $ cargo check --manifest-path crates/ra_hir_def/Cargo.toml --features log/kv_unstable
        Checking ra_hir_def v0.1.0
    error[E0282]: type annotations needed for the closure `fn(&str) -> std::result::Result<(), _>`
       --> crates/ra_hir_def/src/path.rs:278:17
        |
    278 |                 f.write_str("::")?;
        |                 ^^^^^^^^^^^^^^^^^^ cannot infer type
        |
    help: give this closure an explicit return type without `_` placeholders
        |
    276 |         let mut add_segment = |s| -> std::result::Result<(), _> {
        |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-06-03 19:06:02 -07:00
..
body fmt 2020-05-31 12:06:22 +02:00
nameres Pass trivially copy types as copy 2020-05-26 14:12:13 -04:00
path Switch to new magic marks 2020-05-20 13:02:53 +02:00
adt.rs refactor: use attrsOwner directly in is_cfg_enabled 2020-05-05 09:34:07 +02:00
attr.rs Enable hover and autocomplete docs on macro generated items 2020-06-03 06:46:07 -04:00
body.rs add support of feature flag for runnables #4464 2020-05-21 10:48:42 +02:00
builtin_type.rs find_path: Builtins are always in scope 2020-04-18 12:06:22 +02:00
child_by_source.rs Rename StructField -> Field 2020-04-25 14:23:34 +02:00
data.rs Add highlight support for unsafe fn calls and raw ptr deref 2020-06-02 18:54:00 -04:00
db.rs Make find_path_inner a query 2020-05-20 23:54:50 +02:00
diagnostics.rs Simplify Diagnostic structure 2020-04-17 13:56:42 +02:00
docs.rs Consolidate documentation expansion and merging 2020-06-03 06:54:41 -04:00
dyn_map.rs DynMap 2019-12-06 21:28:05 +01:00
expr.rs fmt 2020-05-31 12:06:22 +02:00
find_path.rs Make find_path_inner a query 2020-05-20 23:54:50 +02:00
generics.rs Introduce LowerCtx for path lowering 2020-05-01 20:01:17 +08:00
item_scope.rs invert if 2020-05-05 23:01:07 +08:00
keys.rs Rename StructField -> Field 2020-04-25 14:23:34 +02:00
lang_item.rs Fix some clippy perf warnings 2020-05-25 13:35:52 -04:00
lib.rs Switch to new magic marks 2020-05-20 13:02:53 +02:00
nameres.rs Simplify Diagnostic structure 2020-04-17 13:56:42 +02:00
path.rs Fix type inference failure when built with log/kv_unstable 2020-06-03 19:06:02 -07:00
per_ns.rs Rename ResolvedVisibility -> Visibility 2019-12-26 16:23:40 +01:00
resolver.rs Handle Self in values and patterns 2020-05-15 17:25:28 +02:00
src.rs Use dyn Trait for working with databse 2020-03-16 17:42:30 +01:00
test_db.rs Use dyn Trait for working with databse 2020-03-16 17:42:30 +01:00
trace.rs Simplify Arena to use a generic index 2020-03-19 18:46:30 +01:00
type_ref.rs Support raw_ref_op's raw reference operator 2020-05-28 21:42:22 +02:00
visibility.rs Provide more complete AST accessors to support usage in rustc 2020-04-09 11:50:37 +02:00