<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>crates/rustfix/tests/edge-cases/no_main.json - fork/cargo @ home-0.5.12</title>
<meta name="description" content="crates/rustfix/tests/edge-cases/no_main.json in fork/cargo at home-0.5.12.">
<meta property="og:title" content="crates/rustfix/tests/edge-cases/no_main.json - fork/cargo @ home-0.5.12">
<meta property="og:description" content="crates/rustfix/tests/edge-cases/no_main.json in fork/cargo at home-0.5.12.">
<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="home-0.5.12" data-tip="4f15cc8882fb34bf70c945e9c8ae91d6c8c91757">
<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="eed300d5e83128bbf5ed426e236525f9a77300ad">Auto merge of #13005 - ehuss:rustfix, r=weihanglo</span><span class="snapshot-sha sha" data-commit="eed300d5e83128bbf5ed426e236525f9a77300ad">eed300d5e</span><time datetime="2023-11-21T18:36:36+00:00" title="2023-11-21 18:36:36 +0000">2023-11-21</time></p>
<header class="topbar"><details class="switcher"><summary>home-0.5.12</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 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 class="current" 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/home-0.5.12/tree/crates/">crates</a> / <a href="/fork/cargo/ref/home-0.5.12/tree/crates/rustfix/">rustfix</a> / <a href="/fork/cargo/ref/home-0.5.12/tree/crates/rustfix/tests/">tests</a> / <a href="/fork/cargo/ref/home-0.5.12/tree/crates/rustfix/tests/edge-cases/">edge-cases</a> / <span class="cur">no_main.json</span></nav>
<span class="view-stats"><span>1.2 KiB</span><span>33 lines</span></span><span class="actions"><a class="raw" href="/fork/cargo/raw/e4b1c8f97103042b6edd84d019e6b667b37b19bb/crates/rustfix/tests/edge-cases/no_main.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">{</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&quot;</a-s>: <a-s>&quot;`main` function not found in crate `no_main`&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;code&quot;</a-s>: {</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text">    <a-s>&quot;code&quot;</a-s>: <a-s>&quot;E0601&quot;</a-s>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text">    <a-s>&quot;explanation&quot;</a-s>: <a-s>&quot;No `main` function was found in a binary crate. To fix this error, add a\n`main` function. For example:\n\n```\nfn main() {\n    // Your program will start here.\n    println!(\&quot;Hello world!\&quot;);\n}\n```\n\nIf you don&#39;t know the basics of Rust, you can go look to the Rust Book to get\nstarted: https://doc.rust-lang.org/book/\n&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text">  },</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text">  <a-s>&quot;level&quot;</a-s>: <a-s>&quot;error&quot;</a-s>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text">  <a-s>&quot;spans&quot;</a-s>: [</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text">    {</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text">      <a-s>&quot;file_name&quot;</a-s>: <a-s>&quot;no_main.rs&quot;</a-s>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text">      <a-s>&quot;byte_start&quot;</a-s>: <a-n>26</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text">      <a-s>&quot;byte_end&quot;</a-s>: <a-n>26</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">      <a-s>&quot;line_start&quot;</a-s>: <a-n>1</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text">      <a-s>&quot;line_end&quot;</a-s>: <a-n>1</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text">      <a-s>&quot;column_start&quot;</a-s>: <a-n>27</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text">      <a-s>&quot;column_end&quot;</a-s>: <a-n>27</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text">      <a-s>&quot;is_primary&quot;</a-s>: <a-co>true</a-co>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text">      <a-s>&quot;text&quot;</a-s>: [</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text">        {</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text">          <a-s>&quot;text&quot;</a-s>: <a-s>&quot;// This file has no main.&quot;</a-s>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text">          <a-s>&quot;highlight_start&quot;</a-s>: <a-n>27</a-n>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text">          <a-s>&quot;highlight_end&quot;</a-s>: <a-n>27</a-n></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text">        }</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text">      ],</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text">      <a-s>&quot;label&quot;</a-s>: <a-s>&quot;consider adding a `main` function to `no_main.rs`&quot;</a-s>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text">      <a-s>&quot;suggested_replacement&quot;</a-s>: <a-co>null</a-co>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text">      <a-s>&quot;suggestion_applicability&quot;</a-s>: <a-co>null</a-co>,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text">      <a-s>&quot;expansion&quot;</a-s>: <a-co>null</a-co></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text">    }</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text">  ],</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text">  <a-s>&quot;children&quot;</a-s>: [],</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text">  <a-s>&quot;rendered&quot;</a-s>: <a-s>&quot;error[E0601]: `main` function not found in crate `no_main`\n --&gt; no_main.rs:1:27\n  |\n1 | // This file has no main.\n  |                           ^ consider adding a `main` function to `no_main.rs`\n\n&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text">}</span></span></pre>
</main>
</body>
</html>
