<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>crates/rustfix/tests/everything/use-insert.json - fork/cargo @ 0.90.0</title>
<meta name="description" content="crates/rustfix/tests/everything/use-insert.json in fork/cargo at 0.90.0.">
<meta property="og:title" content="crates/rustfix/tests/everything/use-insert.json - fork/cargo @ 0.90.0">
<meta property="og:description" content="crates/rustfix/tests/everything/use-insert.json in fork/cargo at 0.90.0.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="0.90.0" data-tip="c24e1064277fe51ab72011e2612e556ac56addf7">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/cargo</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/cargo</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">bors</span><span class="commit-message" data-commit="059ec6974f72d4b3fd22eb97f3b6a000714d2044">Auto merge of #13226 - ehuss:fix-empty-span, r=weihanglo</span><span class="snapshot-sha sha" data-commit="059ec6974f72d4b3fd22eb97f3b6a000714d2044">059ec6974</span><time datetime="2024-01-02T02:00:38+00:00" title="2024-01-02 02:00:38 +0000">2024-01-02</time></p>
<header class="topbar"><details class="switcher"><summary>0.90.0</summary><div class="menu"><strong>branches</strong><a href="/fork/cargo/ref/master/">master</a><strong>tags</strong><a href="/fork/cargo/ref/0.87.0/">0.87.0</a><a href="/fork/cargo/ref/0.88.0/">0.88.0</a><a href="/fork/cargo/ref/0.89.0/">0.89.0</a><a class="current" href="/fork/cargo/ref/0.90.0/">0.90.0</a><a href="/fork/cargo/ref/0.91.0/">0.91.0</a><a href="/fork/cargo/ref/0.92.0/">0.92.0</a><a href="/fork/cargo/ref/0.93.0/">0.93.0</a><a href="/fork/cargo/ref/home-0.5.12/">home-0.5.12</a><a class="all" href="/fork/cargo/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/cargo/">cargo</a> / <a href="/fork/cargo/ref/0.90.0/tree/crates/">crates</a> / <a href="/fork/cargo/ref/0.90.0/tree/crates/rustfix/">rustfix</a> / <a href="/fork/cargo/ref/0.90.0/tree/crates/rustfix/tests/">tests</a> / <a href="/fork/cargo/ref/0.90.0/tree/crates/rustfix/tests/everything/">everything</a> / <span class="cur">use-insert.json</span></nav>
<span class="view-stats"><span>2.6 KiB</span><span>3 lines</span></span><span class="actions"><a class="raw" href="/fork/cargo/raw/8496feed7fbe01729664b0c5eb46412f65549168/crates/rustfix/tests/everything/use-insert.json">raw</a></span></header>
<pre class="code src language-json"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text">{<a-s>&quot;$message_type&quot;</a-s>:<a-s>&quot;diagnostic&quot;</a-s>,<a-s>&quot;message&quot;</a-s>:<a-s>&quot;cannot find function `f` in this scope&quot;</a-s>,<a-s>&quot;code&quot;</a-s>:{<a-s>&quot;code&quot;</a-s>:<a-s>&quot;E0425&quot;</a-s>,<a-s>&quot;explanation&quot;</a-s>:<a-s>&quot;An unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n    fn bar() {\n        Self; // error: unresolved name `Self`\n    }\n}\n\n// or:\n\nlet x = unknown_variable;  // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn&#39;t misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n    Foo,\n}\n```\n\nOr:\n\n```\nmod something_that_does_exist {\n    pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n&quot;</a-s>},<a-s>&quot;level&quot;</a-s>:<a-s>&quot;error&quot;</a-s>,<a-s>&quot;spans&quot;</a-s>:[{<a-s>&quot;file_name&quot;</a-s>:<a-s>&quot;./tests/everything/use-insert.rs&quot;</a-s>,<a-s>&quot;byte_start&quot;</a-s>:<a-n>45</a-n>,<a-s>&quot;byte_end&quot;</a-s>:<a-n>46</a-n>,<a-s>&quot;line_start&quot;</a-s>:<a-n>6</a-n>,<a-s>&quot;line_end&quot;</a-s>:<a-n>6</a-n>,<a-s>&quot;column_start&quot;</a-s>:<a-n>5</a-n>,<a-s>&quot;column_end&quot;</a-s>:<a-n>6</a-n>,<a-s>&quot;is_primary&quot;</a-s>:<a-co>true</a-co>,<a-s>&quot;text&quot;</a-s>:[{<a-s>&quot;text&quot;</a-s>:<a-s>&quot;    f();&quot;</a-s>,<a-s>&quot;highlight_start&quot;</a-s>:<a-n>5</a-n>,<a-s>&quot;highlight_end&quot;</a-s>:<a-n>6</a-n>}],<a-s>&quot;label&quot;</a-s>:<a-s>&quot;not found in this scope&quot;</a-s>,<a-s>&quot;suggested_replacement&quot;</a-s>:<a-co>null</a-co>,<a-s>&quot;suggestion_applicability&quot;</a-s>:<a-co>null</a-co>,<a-s>&quot;expansion&quot;</a-s>:<a-co>null</a-co>}],<a-s>&quot;children&quot;</a-s>:[{<a-s>&quot;message&quot;</a-s>:<a-s>&quot;consider importing this function&quot;</a-s>,<a-s>&quot;code&quot;</a-s>:<a-co>null</a-co>,<a-s>&quot;level&quot;</a-s>:<a-s>&quot;help&quot;</a-s>,<a-s>&quot;spans&quot;</a-s>:[{<a-s>&quot;file_name&quot;</a-s>:<a-s>&quot;./tests/everything/use-insert.rs&quot;</a-s>,<a-s>&quot;byte_start&quot;</a-s>:<a-n>0</a-n>,<a-s>&quot;byte_end&quot;</a-s>:<a-n>0</a-n>,<a-s>&quot;line_start&quot;</a-s>:<a-n>1</a-n>,<a-s>&quot;line_end&quot;</a-s>:<a-n>1</a-n>,<a-s>&quot;column_start&quot;</a-s>:<a-n>1</a-n>,<a-s>&quot;column_end&quot;</a-s>:<a-n>1</a-n>,<a-s>&quot;is_primary&quot;</a-s>:<a-co>true</a-co>,<a-s>&quot;text&quot;</a-s>:[],<a-s>&quot;label&quot;</a-s>:<a-co>null</a-co>,<a-s>&quot;suggested_replacement&quot;</a-s>:<a-s>&quot;use a::f;\n\n&quot;</a-s>,<a-s>&quot;suggestion_applicability&quot;</a-s>:<a-s>&quot;MaybeIncorrect&quot;</a-s>,<a-s>&quot;expansion&quot;</a-s>:<a-co>null</a-co>}],<a-s>&quot;children&quot;</a-s>:[],<a-s>&quot;rendered&quot;</a-s>:<a-co>null</a-co>}],<a-s>&quot;rendered&quot;</a-s>:<a-s>&quot;error[E0425]: cannot find function `f` in this scope\n --&gt; ./tests/everything/use-insert.rs:6:5\n  |\n6 |     f();\n  |     ^ not found in this scope\n  |\nhelp: consider importing this function\n  |\n1 + use a::f;\n  |\n\n&quot;</a-s>}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text">{<a-s>&quot;$message_type&quot;</a-s>:<a-s>&quot;diagnostic&quot;</a-s>,<a-s>&quot;message&quot;</a-s>:<a-s>&quot;aborting due to 1 previous error&quot;</a-s>,<a-s>&quot;code&quot;</a-s>:<a-co>null</a-co>,<a-s>&quot;level&quot;</a-s>:<a-s>&quot;error&quot;</a-s>,<a-s>&quot;spans&quot;</a-s>:[],<a-s>&quot;children&quot;</a-s>:[],<a-s>&quot;rendered&quot;</a-s>:<a-s>&quot;error: aborting due to 1 previous error\n\n&quot;</a-s>}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text">{<a-s>&quot;$message_type&quot;</a-s>:<a-s>&quot;diagnostic&quot;</a-s>,<a-s>&quot;message&quot;</a-s>:<a-s>&quot;For more information about this error, try `rustc --explain E0425`.&quot;</a-s>,<a-s>&quot;code&quot;</a-s>:<a-co>null</a-co>,<a-s>&quot;level&quot;</a-s>:<a-s>&quot;failure-note&quot;</a-s>,<a-s>&quot;spans&quot;</a-s>:[],<a-s>&quot;children&quot;</a-s>:[],<a-s>&quot;rendered&quot;</a-s>:<a-s>&quot;For more information about this error, try `rustc --explain E0425`.\n&quot;</a-s>}</span></span></pre>
</main>
</body>
</html>
